content/base/test/file_bug326337_inner.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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=326337
     5 -->
     6 <head>
     7   <title>Inner file for Bug 326337</title>
     8 </head>
     9 <body>
    10 <script>
    12 document.domain = "example.com";
    14 runTest();
    16 var xhr;
    18 function runTest() {
    19   xhr = new XMLHttpRequest();
    20   xhr.open("GET", "file_bug326337.xml", true);
    21   xhr.onreadystatechange = function() {
    22     if (xhr.readyState == 4) {
    23       check(xhr.responseXML.documentElement.getAttribute("root"));
    24       SpecialPowers.wrap(parent).location.hash = "#done";
    25     }
    26   }
    27   xhr.send(null);
    28 }
    30 function check(attr) {
    31   if (attr != "yes") {
    32     SpeciaPowers.wrap(parent).location.hash = "#fail";
    33     throw 1;
    34   }
    35 }
    37 </script>
    38 </pre>
    39 </body>
    40 </html>

mercurial