tor-browser

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

visible-to-hidden.html (889B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: visibility:hidden</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <div id="target" style="position: absolute; top: 0; width: 400px; height: 400px; background: blue;"></div>
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="resources/util.js"></script>
      8 <script>
      9 
     10 promise_test(async () => {
     11  const watcher = new ScoreWatcher;
     12 
     13  // Wait for the initial render to complete.
     14  await waitForAnimationFrames(2);
     15 
     16  // Shift target and make hidden at the same time. Should not be reported!
     17  document.querySelector("#target").style.top = '200px';
     18  document.querySelector("#target").style.visibility = 'hidden';
     19 
     20  await waitForAnimationFrames(2);
     21  // No shift should be reported.
     22  assert_equals(watcher.score, 0);
     23 }, 'visible to hidden');
     24 
     25 </script>