tor-browser

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

content-visibility-023.html (1125B)


      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-023-ref.html">
      8 <meta name="assert" content="content-visibility hidden iframe paints when hidden is removed">
      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 “PASS” and a green box can been seen below.</div>
     23 <iframe id="frame" class=hidden width=400 height=200 srcdoc='
     24  <style>
     25  div {
     26    background: green;
     27  }
     28  </style>
     29  <div>PASS</div>
     30 '></iframe>
     31 <div>Lorem ipsum consectetur adipiscing elit</div>
     32 
     33 <script>
     34 async function runTest() {
     35  document.getElementById("frame").classList.remove("hidden");
     36  requestAnimationFrame(takeScreenshot);
     37 }
     38 
     39 window.onload = () => {
     40  requestAnimationFrame(() => {
     41    requestAnimationFrame(runTest);
     42  });
     43 };
     44 </script>
     45 </html>