testing/mochitest/redirect.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testing/mochitest/redirect.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +<html>
     1.5 +<head>
     1.6 +  <title>redirecting...</title>
     1.7 +
     1.8 +  <script type="text/javascript">
     1.9 +    function redirect(aURL)
    1.10 +    {
    1.11 +      // We create a listener for this event in browser-test.js 
    1.12 +      // which will get picked up when specifying --chrome or --a11y
    1.13 +      var event = new CustomEvent("contentEvent", {
    1.14 +        bubbles: true,
    1.15 +        detail: {
    1.16 +          "data": aURL + location.search,
    1.17 +          "type": "loadURI"
    1.18 +        }
    1.19 +      });
    1.20 +      document.dispatchEvent(event);
    1.21 +    }
    1.22 +
    1.23 +    function onLoad() {
    1.24 +      redirect("chrome://mochikit/content/harness.xul");
    1.25 +    }
    1.26 +  </script>
    1.27 +</head>
    1.28 +
    1.29 +<body onload="onLoad();">
    1.30 +redirecting...
    1.31 +</body>
    1.32 +</html>

mercurial