Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>scroll handoff</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/paint_listener.js"></script>
  <script src="helper_fission_utils.js"></script>
  <script src="apz_test_utils.js"></script>
  <script src="apz_test_native_event_utils.js"></script>
  <script>
    async function test() {
      const iframe = document.querySelector("iframe");
      await setupCrossOriginIFrame(iframe, "helper_fission_plain.html");
      let scrollEventPromise = new Promise(resolve => {
        window.addEventListener("scroll", resolve, { once: true });
      });
      await synthesizeNativeWheel(iframe, 100, 100, 0, -50);
      await scrollEventPromise;
      ok(window.scrollY > 0,
        "Mouse wheel scrolling on OOP iframes in position:fixed subtree " +
        "should be handed off to the parent");
    }
    waitUntilApzStable()
      .then(test)
      .then(subtestDone, subtestFailed);
  </script>
</head>
<style>
  iframe {
    position: fixed;
    width: 500px;
    height: 500px;
  }
</style>
<body>
  <iframe id="testframe"></iframe>
  <div style="height:1000vh"></div>
</body>
</html>