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

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:1251c45f75d5
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>
4
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" />
8
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 }
15
16 function onFallbackLoad(fallbackIdentification)
17 {
18 OfflineTest.is(fallbackIdentification, 1, "Got correct fallback for namespace1 (2)");
19
20 applicationCache.onerror = function() {}; // the update invoked by the iframe will finish after we discard the cache, ignore error
21 OfflineTest.teardownAndFinish();
22 }
23
24 SimpleTest.waitForExplicitFinish();
25
26 if (OfflineTest.setup()) {
27 applicationCache.onerror = OfflineTest.failEvent;
28 applicationCache.onupdateready = OfflineTest.failEvent;
29 applicationCache.oncached = OfflineTest.priv(manifestUpdated);
30 }
31
32 </script>
33
34 </head>
35
36 <body>
37 <iframe name="fallbackFrame"></iframe>
38 </body>
39 </html>

mercurial