testing/mochitest/redirect.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html>
     2 <head>
     3   <title>redirecting...</title>
     5   <script type="text/javascript">
     6     function redirect(aURL)
     7     {
     8       // We create a listener for this event in browser-test.js 
     9       // which will get picked up when specifying --chrome or --a11y
    10       var event = new CustomEvent("contentEvent", {
    11         bubbles: true,
    12         detail: {
    13           "data": aURL + location.search,
    14           "type": "loadURI"
    15         }
    16       });
    17       document.dispatchEvent(event);
    18     }
    20     function onLoad() {
    21       redirect("chrome://mochikit/content/harness.xul");
    22     }
    23   </script>
    24 </head>
    26 <body onload="onLoad();">
    27 redirecting...
    28 </body>
    29 </html>

mercurial