dom/tests/mochitest/ajax/offline/test_bypass.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 xmlns="http://www.w3.org/1999/xhtml" manifest="bypass.cacheManifest">
     2 <head>
     3 <title>Bypass test</title>
     5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6 <script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
     7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     9 <script class="testbody" type="text/javascript">
    11 /**
    12  * This test defines manifest with namespace1/sub2 and namespace2 as bypass
    13  * namespaces.
    14  * When cache update finishes it loads a test body in an iframe. This iframe
    15  * refers four js scripts, some matching the namespace to bypass and some not.
    16  * Then checks that just expected scripts loads by calling a method of each
    17  * of the script.
    18  */
    20 SimpleTest.waitForExplicitFinish();
    22 if (OfflineTest.setup()) {
    23   // Load test body when cache update process finished. The test itself
    24   // continues at that file.
    25   applicationCache.oncached = function()
    26   {
    27     window.open("bypass.html");
    28   }
    29 }
    31 </script>
    33 </head>
    35 <body>
    36 </body>
    37 </html>

mercurial