tor-browser

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

helper_fission_unresolved_clip.html (2046B)


      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>Ensure an unresolved clip area on the top level document interfere OOPIFs hit-test</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 async function test() {
     14  const iframe = document.getElementById("testframe");
     15  await setupCrossOriginIFrame(iframe, "helper_fission_plain.html");
     16  const remoteType = await SpecialPowers.spawn(iframe, [], async () => {
     17    return await SpecialPowers.spawnChrome([], () => {
     18      return windowGlobalParent.domProcess.remoteType;
     19    });
     20  });
     21  if (remoteType === "web") {
     22    is(SpecialPowers.effectiveIsolationStrategy(), SpecialPowers.ISOLATION_STRATEGY.IsolateHighValue);
     23    ok(true, "Skipping this test since the document on example.com got loaded in the same content process");
     24    return;
     25  }
     26 
     27  const utils = SpecialPowers.getDOMWindowUtils(window);
     28  checkHitResult(await hitTestOOPIF(centerOf(iframe), iframe),
     29                 APZHitResultFlags.VISIBLE,
     30                 utils.getViewId(document.scrollingElement),
     31                 utils.getLayersId(),
     32                 "Hit testing on OOPIF covered by an unresolved clipped element");
     33 }
     34 
     35 if (!SpecialPowers.Services.appinfo.fissionAutostart) {
     36  ok(true, "This test doesn't need to run with disabling Fission");
     37  subtestDone();
     38 } else {
     39  waitUntilApzStable()
     40    .then(test)
     41    .then(subtestDone, subtestFailed);
     42 }
     43  </script>
     44 </head>
     45 <body>
     46 <style>
     47 html, body {
     48  margin: 0;
     49 }
     50 
     51 iframe {
     52  position: absolute;
     53  width: 300px;
     54  height: 200px;
     55 }
     56 
     57 #clip {
     58  position: absolute;
     59  top: 0;
     60  left: 0;
     61  width: 100%;
     62  height: 100%;
     63  z-index: 100;
     64  clip-path: url(#unresolved);
     65  opacity: 0;
     66 }
     67 </style>
     68 <div id="clip"></div>
     69 <iframe id="testframe"></iframe>
     70 </body>
     71 </html>