dom/tests/mochitest/ajax/offline/offlineChild.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 <title></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>
     9 <script type="text/javascript">
    11 // This is called by the parent when the offline update is complete
    12 // (since we don't get those events)
    13 function doneLoading()
    14 {
    15   window.parent.childFinished();
    16 }
    18 if (OfflineTest.setupChild()) {
    19   // Child frames shouldn't be receiving cache events.
    20   applicationCache.onerror = OfflineTest.failEvent;
    21   applicationCache.onnoupdate = OfflineTest.failEvent;
    22   applicationCache.ondownloading = OfflineTest.failEvent;
    23   applicationCache.onprogress = OfflineTest.failEvent;
    24   applicationCache.onupdateready = OfflineTest.failEvent;
    25   applicationCache.oncached = OfflineTest.failEvent;
    26 }
    27 </script>
    29 </head>
    31 <body>
    33 </body> </html>

mercurial