tor-browser

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

shift-into-viewport-inline-direction.html (815B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: shift into viewport in inline direction</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <style>
      5 #j { position: absolute; width: 200px; height: 600px; left: -200px; background: blue; }
      6 </style>
      7 <div id='j'></div>
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="resources/util.js"></script>
     11 <script>
     12 
     13 promise_test(async () => {
     14  const watcher = new ScoreWatcher;
     15 
     16  // Wait for the initial render to complete.
     17  await waitForAnimationFrames(2);
     18 
     19  // Move div into viewport horizontally.
     20  document.querySelector("#j").style.left = '100px';
     21 
     22  await waitForAnimationFrames(3);
     23  assert_equals(watcher.score, 0);
     24 }, "Shift into viewport in inline direction.");
     25 
     26 </script>