tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

content-visibility-020.html (1142B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: hidden iframe</title>
      5 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
      6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
      7 <link rel="match" href="content-visibility-020-ref.html">
      8 <meta name="assert" content="content-visibility hidden iframe does not paint">
      9 
     10 <script src="/common/reftest-wait.js"></script>
     11 
     12 <style>
     13 div {
     14  background: blue;
     15  color: white;
     16 }
     17 .hidden {
     18  content-visibility: hidden;
     19 }
     20 </style>
     21 
     22 <div>Test passes if the word “FAIL” does not appear below and if there is no red.</div>
     23 <iframe id="frame" width=400 height=200 srcdoc='
     24  <style>
     25  div {
     26    background: red;
     27  }
     28  </style>
     29  <div>FAIL</div>
     30 '></iframe>
     31 <div>Test passes if the word “FAIL” does not appear above and if there is no red.</div>
     32 
     33 <script>
     34 async function runTest() {
     35  document.getElementById("frame").classList.add("hidden");
     36  requestAnimationFrame(takeScreenshot);
     37 }
     38 
     39 window.onload = () => {
     40  requestAnimationFrame(() => {
     41    requestAnimationFrame(runTest);
     42  });
     43 };
     44 </script>
     45 </html>