dom/tests/mochitest/ajax/offline/test_bug474696.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/fallback.cacheManifest">
     2 <head>
     3 <title>Fallback on different origin redirect 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">
    10 function manifestUpdated()
    11 {
    12   fallbackFrame.location = "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/namespace1/redirectToDifferentOrigin.sjs";
    13   // Invokes load of fallback.html
    14 }
    16 function onFallbackLoad(fallbackIdentification)
    17 {
    18   OfflineTest.is(fallbackIdentification, 1, "Got correct fallback for namespace1 (2)");
    20   applicationCache.onerror = function() {}; // the update invoked by the iframe will finish after we discard the cache, ignore error
    21   OfflineTest.teardownAndFinish();
    22 }
    24 SimpleTest.waitForExplicitFinish();
    26 if (OfflineTest.setup()) {
    27   applicationCache.onerror = OfflineTest.failEvent;
    28   applicationCache.onupdateready = OfflineTest.failEvent;
    29   applicationCache.oncached = OfflineTest.priv(manifestUpdated);
    30 }
    32 </script>
    34 </head>
    36 <body>
    37 <iframe name="fallbackFrame"></iframe>
    38 </body>
    39 </html>

mercurial