tor-browser

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

helper_fission_scroll_handoff.html (1274B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <meta name="viewport" content="width=device-width,initial-scale=1">
      6  <title>scroll handoff</title>
      7  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      8  <script src="/tests/SimpleTest/paint_listener.js"></script>
      9  <script src="helper_fission_utils.js"></script>
     10  <script src="apz_test_utils.js"></script>
     11  <script src="apz_test_native_event_utils.js"></script>
     12  <script>
     13 
     14    async function test() {
     15      const iframe = document.querySelector("iframe");
     16      await setupCrossOriginIFrame(iframe, "helper_fission_plain.html");
     17 
     18      let scrollEventPromise = new Promise(resolve => {
     19        window.addEventListener("scroll", resolve, { once: true });
     20      });
     21 
     22      await synthesizeNativeWheel(iframe, 100, 100, 0, -50);
     23      await scrollEventPromise;
     24 
     25      ok(window.scrollY > 0,
     26        "Mouse wheel scrolling on OOP iframes in position:fixed subtree " +
     27        "should be handed off to the parent");
     28    }
     29 
     30    waitUntilApzStable()
     31      .then(test)
     32      .then(subtestDone, subtestFailed);
     33 
     34  </script>
     35 </head>
     36 <style>
     37  iframe {
     38    position: fixed;
     39    width: 500px;
     40    height: 500px;
     41  }
     42 </style>
     43 <body>
     44  <iframe id="testframe"></iframe>
     45  <div style="height:1000vh"></div>
     46 </body>
     47 </html>