testing/mochitest/redirect.html
author Serge Gautherie <sgautherie.bz@free.fr>
Fri, 30 Mar 2012 12:27:50 +0200
changeset 92434 af214ef4172e4e2572d3c758ea3695d6562ea08c
parent 78881 54cb80b5d5a1ac8d336f3881554ac5d724f3ea4c
permissions -rw-r--r--
Bug 733269. (Av1) redirect.html: Let its load complete before redirecting. rs=jwalden.

<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 element = document.createEvent("datacontainerevent");
      element.initEvent("contentEvent", true, false);
      element.setData("data", aURL + location.search);
      element.setData("type", "loadURI");
      document.dispatchEvent(element);
    }

    function onLoad() {
      redirect("chrome://mochikit/content/harness.xul");
    }
  </script>
</head>

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