content/base/test/test_bug789856.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=789856
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 789856</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789856">Mozilla Bug 789856</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** Test for Bug 789856 **/
    22 SimpleTest.waitForExplicitFinish();
    24 var script = document.createElement("script");
    25 script.onload = function() {
    26   ok(false, "This script should not load");
    27   SimpleTest.finish();
    28 }
    29 script.onerror = function() {
    30   ok(true, "This script should fail to load");
    31   SimpleTest.finish();
    32 }
    33 // If neither one fires,  the test fails, as it should
    35 // Use a URL the test is not allowed to load
    36 script.src = "file:///tmp/"
    37 document.body.appendChild(script);
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial