summaryrefslogtreecommitdiffstats
path: root/testing/mochitest/tests/SimpleTest/iframe-between-tests.html
blob: b5efaf6170ead4382a6043c0e7628c4116ec5c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<title>iframe for between tests</title>
<!--
  This page exists so that our accounting for assertions correctly
  counts assertions that happen while leaving a page.  We load this page
  after a test finishes, check the assertion counts, and then go on to
  load the next.
-->
<script>
window.addEventListener("load", function() {
  var runner = (parent.TestRunner || parent.wrappedJSObject.TestRunner);
  const urlParams = new URLSearchParams(window.location.search);
  var result = urlParams.get("result", "ERROR");
  var runtime = urlParams.get("runtime", "-1");
  runner.testUnloaded(result, runtime);

  if (SpecialPowers) {
    SpecialPowers.DOMWindowUtils.runNextCollectorTimer();
  }
});
</script>