1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/ajax/offline/test_bug474696.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/fallback.cacheManifest"> 1.5 +<head> 1.6 +<title>Fallback on different origin redirect test</title> 1.7 + 1.8 +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 +<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script> 1.10 +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.11 + 1.12 +<script class="testbody" type="text/javascript"> 1.13 +function manifestUpdated() 1.14 +{ 1.15 + fallbackFrame.location = "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/namespace1/redirectToDifferentOrigin.sjs"; 1.16 + // Invokes load of fallback.html 1.17 +} 1.18 + 1.19 +function onFallbackLoad(fallbackIdentification) 1.20 +{ 1.21 + OfflineTest.is(fallbackIdentification, 1, "Got correct fallback for namespace1 (2)"); 1.22 + 1.23 + applicationCache.onerror = function() {}; // the update invoked by the iframe will finish after we discard the cache, ignore error 1.24 + OfflineTest.teardownAndFinish(); 1.25 +} 1.26 + 1.27 +SimpleTest.waitForExplicitFinish(); 1.28 + 1.29 +if (OfflineTest.setup()) { 1.30 + applicationCache.onerror = OfflineTest.failEvent; 1.31 + applicationCache.onupdateready = OfflineTest.failEvent; 1.32 + applicationCache.oncached = OfflineTest.priv(manifestUpdated); 1.33 +} 1.34 + 1.35 +</script> 1.36 + 1.37 +</head> 1.38 + 1.39 +<body> 1.40 +<iframe name="fallbackFrame"></iframe> 1.41 +</body> 1.42 +</html>