tor-browser

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

fullscreen-root-block-scroll.html (1008B)


      1 <!DOCTYPE html>
      2 <style>
      3  body {
      4    height: 10000px;
      5    background: grey;
      6  }
      7 </style>
      8 <title>fullscreen root block scrolling</title>
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/resources/testdriver.js"></script>
     12 <script src="/resources/testdriver-vendor.js"></script>
     13 <script src="../trusted-click.js"></script>
     14 <body>
     15 <div>
     16  This page tests that entering fullscreen doesn't adjust the scroll offset
     17 </div>
     18 <script>
     19  promise_test(async (t) => {
     20    t.add_cleanup(() => {
     21      if (document.fullscreenElement) {
     22        return document.exitFullscreen();
     23      }
     24    });
     25    await trusted_click();
     26    document.scrollingElement.scrollTop = 300;
     27    await document.documentElement.requestFullscreen();
     28    await fullScreenChange();
     29 
     30    assert_equals(document.fullscreenElement, document.documentElement);
     31    assert_not_equals(document.scrollingElement.scrollTop, 0);
     32    document.scrollingElement.scrollTop = 0;
     33  });
     34 </script>