gfx/layers/apz/test/mochitest/helper_fission_basic.html
author Cosmin Sabou <csabou@mozilla.com>
Sun, 05 Feb 2023 19:37:33 +0000
changeset 651812 d8601249f1eb8c52c742b0c19c9ca0fa8f2e31fe
parent 558717 dc14e00ab4f8cec08c9e738bc256d627a7afc675
permissions -rw-r--r--
Bug 1806090 - temporarily disable browser_quickactions.js on linux for frequent failures. r=intermittent-reviewers,MasterWayZ Differential Revision: https://phabricator.services.mozilla.com/D168909

<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Basic sanity test that runs inside a fission-enabled window</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>

fission_subtest_init();

FissionTestHelper.startTestPromise
  .then(waitUntilApzStable)
  .then(loadOOPIFrame("testframe", "helper_fission_empty.html"))
  .then(waitUntilApzStable)
  .then(test)
  .then(FissionTestHelper.subtestDone, FissionTestHelper.subtestFailed);


// The actual test

async function test() {
  let iframeElement = document.getElementById("testframe");
  ok(SpecialPowers.wrap(window)
       .docShell
       .QueryInterface(SpecialPowers.Ci.nsILoadContext)
       .useRemoteSubframes,
     "OOP iframe is actually OOP");
  let iframeResult = await FissionTestHelper.sendToOopif(iframeElement, "20 + 22");
  is(iframeResult, 42, "Basic content fission test works");
}

  </script>
</head>
<body>
<iframe id="testframe"></iframe>
</body>
</html>