testing/mochitest/redirect.html
author ffxbld <ffxbld@mozilla.com>
Thu, 05 Dec 2019 10:08:34 +0000
changeset 563505 7067896c7696e3f5cf3b76ff53ecad8d65e9cc30
parent 500637 edc4ae8f78e2fb02647d7cd85cb19830a17dcd1d
permissions -rw-r--r--
No Bug, mozilla-release repo-update blocklist remote-settings - a=repo-update r=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D55932

<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 --flavor=chrome or --flavor=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() {
      setTimeout(redirectToHarness, 0);
      // In case the listener is not ready, re-try periodically
      setInterval(redirectToHarness, 5000);
    }
  </script>
</head>

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