tor-browser

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

shift-invisible.html (703B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: shift of invisible element not counted</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <div id="target" style="width: 100px; height: 100px; position: relative"></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  target.style.top = "200px";
     17 
     18  await waitForAnimationFrames(3);
     19  assert_equals(watcher.score, 0);
     20 }, "Shift of invisible element not counted.");
     21 
     22 </script>