tor-browser

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

shift-with-counterscroll.html (1094B)


      1 <!DOCTYPE html>
      2 <title>Layout Instability: shift with counterscroll not counted</title>
      3 <link rel="help" href="https://wicg.github.io/layout-instability/" />
      4 <style>
      5 
      6 #s {
      7  overflow: scroll;
      8  position: absolute;
      9  left: 20px;
     10  top: 20px;
     11  width: 200px;
     12  height: 200px;
     13 }
     14 #sp {
     15  width: 170px;
     16  height: 600px;
     17 }
     18 #ch {
     19  position: relative;
     20  background: yellow;
     21  left: 10px;
     22  top: 100px;
     23  width: 150px;
     24  height: 150px;
     25 }
     26 
     27 </style>
     28 <div id="s">
     29  <div id="sp">
     30    <div id="ch"></div>
     31  </div>
     32 </div>
     33 <script src="/resources/testharness.js"></script>
     34 <script src="/resources/testharnessreport.js"></script>
     35 <script src="resources/util.js"></script>
     36 <script>
     37 
     38 promise_test(async () => {
     39  const watcher = new ScoreWatcher;
     40 
     41  // Wait for the initial render to complete.
     42  await waitForAnimationFrames(2);
     43 
     44  let scroller = document.querySelector("#s");
     45  let changer = document.querySelector("#ch");
     46 
     47  changer.style.top = "200px";
     48  scroller.scrollTop = 100;
     49 
     50  await waitForAnimationFrames(3);
     51  assert_equals(watcher.score, 0);
     52 }, "Shift with counterscroll not counted.");
     53 
     54 </script>