content/base/test/test_bug390219.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=390219
     5 -->
     6 <head>
     7   <meta http-equiv="content-type" content="text/html; charset=utf-8">
     8   <title>Test for Bug 390219</title>
     9   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    11 </head>
    12 <body>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script class="testbody" type="text/javascript">
    19 /** Test for Bug 390219 **/
    21 SimpleTest.waitForExplicitFinish();
    22 xhr = new XMLHttpRequest();
    23 xhr.open("GET", "nonexistent_url", true);
    24 xhr.send(null);
    25 xhr.abort();
    26 xhr.open("GET", ".", true);
    27 xhr.onreadystatechange = function() {
    28   if (xhr.readyState == 4) {
    29     is(xhr.status, 200, "wrong status");
    30     SimpleTest.finish();
    31   }
    32 }
    33 xhr.send(null);
    35 </script>
    36 </pre>
    37 </body>
    38 </html>

mercurial