testing/mochitest/redirect.html
author Chris Manchester <cmanchester@mozilla.com>
Mon, 20 Jun 2016 16:02:01 -0700
changeset 302133 2f946ab553f7789fa70cde959d30a3513dfda1f2
parent 216570 6d8adc89991c59a374092f02d220e52aa1effe12
child 308786 43ebf330ad942617aa8526294493a3dd25c0fc8d
permissions -rw-r--r--
Bug 1279369 - Move --enable-debug, MOZ_DEBUG_FLAGS, and --enable-debug-symbols to Python configure. r=glandium Setting MOZ_DEBUG_SYMBOLS as a define was not moved, as this value is not checked, and exporting MOZ_DEBUG_SYMBOLS was not moved, as this would only impact nspr, and we're no longer using the nspr build system. MozReview-Commit-ID: EvBTunhxcsr

<html>
<head>
  <title>redirecting...</title>

  <script type="text/javascript">
    function redirect(aURL)
    {
      // We create a listener for this event in browser-test.js 
      // which will get picked up when specifying --chrome or --a11y
      var event = new CustomEvent("contentEvent", {
        bubbles: true,
        detail: {
          "data": aURL + location.search,
          "type": "loadURI"
        }
      });
      document.dispatchEvent(event);
    }

    function redirectToHarness()
    {
      redirect("chrome://mochikit/content/harness.xul");
    }

    function onLoad() {
      // Wait for MozAfterPaint, since the listener in browser-test.js is not
      // added until then.
      window.addEventListener("MozAfterPaint", function testOnMozAfterPaint() {
        window.removeEventListener("MozAfterPaint", testOnMozAfterPaint);
        setTimeout(redirectToHarness, 0);
      });

    }
  </script>
</head>

<body onload="onLoad();">
redirecting...
</body>
</html>