tor-browser

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

scroll-top-test-with-zoom.html (948B)


      1 <!doctype html>
      2 <title>Scroll Top Test with Zoom</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-viewport/#zoom-property">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <style>
      7  #container {
      8    width: 200px;
      9    height: 100px;
     10    border: solid thick;
     11    overflow: auto;
     12  }
     13 </style>
     14 <div id="container">
     15  <div style="width: 100px; height: 2000px"></div>
     16 </div>
     17 
     18 <script>
     19  var container = document.getElementById('container');
     20  container.scrollTop = 77;
     21  test(function() {
     22    assert_equals(container.scrollTop, 77, "Initial scrollTop should be 77");
     23  }, "Initial scrollTop with no zoom");
     24 
     25  document.body.style.zoom = 1.2;
     26  document.body.offsetTop;
     27 
     28  document.body.style.zoom = 1;
     29  test(function() {
     30    assert_equals(container.scrollTop, 77, "scrollTop should remain consistent after resetting zoom");
     31  }, "scrollTop after resetting zoom");
     32  done();
     33 </script>