tor-browser

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

viewport-resize-event-on-load-overflowing-page.html (1285B)


      1 <!doctype html>
      2 <html>
      3    <head>
      4        <title>Viewport: Resize Event On Load Overflowing Page</title>
      5        <meta charset="utf-8">
      6        <meta name="viewport" content="width=device-width, minimum-scale=1">
      7        <script src="/resources/testharness.js"></script>
      8        <script src="/resources/testharnessreport.js"></script>
      9        <script src="viewport_support.js"></script>
     10        <script>
     11            var t = async_test(
     12                "Resize event fired exactly once against window.visualViewport if " +
     13                "scrollbars affect layout.");
     14            t.step(() => {
     15              // Run the test in a new window to make sure we don't pick up
     16              // a resize event due to a previous page having a different scale.
     17              var win = window.open("helper-resize-event-on-load-overflowing-page.html");
     18              t.add_cleanup(() => win.close());
     19            });
     20        </script>
     21    </head>
     22    <body>
     23    <h1>Viewport: Resize Event On Load Overflowing Page</h1>
     24    <h4>
     25        Test Description: This test ensures that we fire a resize event against
     26        window.visualViewport if the page has overflow (since this creates a scrollbar
     27        and thus changes the viewport size).
     28    </h4>
     29    <div id="log"></div>
     30    </body>
     31 </html>