docshell/test/navigation/navigate.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     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     4     <script src="NavigationUtils.js"></script>
     5     <script>
     6     function navigate() {
     7         var arguments = window.location.hash.substring(1).split(",");
     8         var target = arguments[0];
     9         var mechanism = arguments[1];
    11         switch(mechanism) {
    12         case "location":
    13           navigateByLocation(eval(target));
    14           break;
    15         case "open":
    16           navigateByOpen(target);
    17           break;
    18         case "form":
    19           navigateByForm(target);
    20           break;
    21         case "hyperlink":
    22           navigateByHyperlink(target);
    23           break;
    24         }
    25     }
    26     </script>
    27 </head>
    28 <body onload="navigate();">
    29 <script>
    30 var arguments = window.location.hash.substring(1).split(",");
    31 var target = arguments[0];
    32 var mechanism = arguments[1];
    33 document.write("target=" + target + " mechanism=" + mechanism);
    34 </script>
    35 </body>
    36 </html>

mercurial