tor-browser

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

content-visibility-021.html (1284B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: hidden image</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-021-ref.html">
      8 <meta name="assert" content="content-visibility hidden img element does not paint replaced content">
      9 
     10 <script src="/common/reftest-wait.js"></script>
     11 
     12 <style>
     13 div {
     14  background: blue;
     15  color: white;
     16 }
     17 img {
     18  width: 400px;
     19  height: 200px;
     20  background: lightblue;
     21  border: 1px solid black;
     22 }
     23 .hidden {
     24  content-visibility: hidden;
     25 }
     26 </style>
     27 
     28 <div>Test passes if there are two identical light blue boxes below and no image in them.</div>
     29 <img id="img1" src="resources/dice.png"></img>
     30 <img id="img2" src="resources/circles.svg"></img>
     31 <div>Test passes if there are two identical light blue boxes above and no image in them.</div>
     32 
     33 <script>
     34 async function runTest() {
     35  document.getElementById("img1").classList.add("hidden");
     36  document.getElementById("img2").classList.add("hidden");
     37  requestAnimationFrame(takeScreenshot);
     38 }
     39 
     40 window.onload = () => {
     41  requestAnimationFrame(() => {
     42    requestAnimationFrame(runTest);
     43  });
     44 };
     45 </script>
     46 </html>