dom/tests/mochitest/ajax/offline/460353_iframe_ownmanifest.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="updatingManifest.sjs">
     2 <head>
     3 <title>Bug 460353, iframe with a different manifest reference</title>
     5 <script type="text/javascript">
     7 applicationCache.onerror = function() {
     8   parent.frameOnUpdate("diff", false);
     9 }
    11 applicationCache.oncached = function() {
    12   parent.frameOnUpdate("diff", true, applicationCache.status);
    14   /* This code tries to figure out what cache is really
    15      associated to this document, but hangs on getter2.getInterface
    16      from for now unknown reasons. Commenting this out.
    18   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    20   var Ci = Components.interfaces;
    22   var getter1 = window.QueryInterface(Ci.nsIInterfaceRequestor);
    23   var webnav = getter1.getInterface(Ci.nsIWebNavigation);
    24   var getter2 = webnav.QueryInterface(Ci.nsIInterfaceRequestor);
    25   var cacheCont = getter2.getInterface(Ci.nsIApplicationCacheContainer);
    26   var cache = cacheCont.applicationCache;
    27   dump(cache.groupID);
    28   */
    29 }
    31 </script>
    33 </head>
    34 <body onload="parent.frameOnLoad('diff', applicationCache.status);">
    35   This is an iframe with a different manifest reference
    36 </body>
    37 </html>

mercurial