diff options
Diffstat (limited to 'dom/tests/mochitest/ajax/offline/test_bug744719.html')
-rw-r--r-- | dom/tests/mochitest/ajax/offline/test_bug744719.html | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/dom/tests/mochitest/ajax/offline/test_bug744719.html b/dom/tests/mochitest/ajax/offline/test_bug744719.html new file mode 100644 index 000000000..2c9f5687f --- /dev/null +++ b/dom/tests/mochitest/ajax/offline/test_bug744719.html @@ -0,0 +1,76 @@ +<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/744719.cacheManifest"> +<head> +<title>parallel load</title> + +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> +<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script> +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> + +<script type="text/javascript"> + +/* + Simply load a large number of resources and check all are properly cached. This should cover all parts + of the parallel loading code. +*/ + +if (SpecialPowers.isMainProcess()) { + ok(applicationCache.mozItems.length == 0, + "applicationCache.mozItems should be available and empty before associating with a cache."); +} + +function manifestUpdated() +{ + OfflineTest.checkCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/744719.cacheManifest", true); + OfflineTest.checkCache("http://mochi.test:8888/tests/SimpleTest/SimpleTest.js", true); + OfflineTest.checkCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", true); + + var URL = "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/subresource744719.html?"; + OfflineTest.checkCache(URL + "001", true); + OfflineTest.checkCache(URL + "002", true); + OfflineTest.checkCache(URL + "003", true); + OfflineTest.checkCache(URL + "004", true); + OfflineTest.checkCache(URL + "005", true); + OfflineTest.checkCache(URL + "006", true); + OfflineTest.checkCache(URL + "007", true); + OfflineTest.checkCache(URL + "008", true); + OfflineTest.checkCache(URL + "009", true); + OfflineTest.checkCache(URL + "010", true); + OfflineTest.checkCache(URL + "011", true); + OfflineTest.checkCache(URL + "012", true); + OfflineTest.checkCache(URL + "013", true); + OfflineTest.checkCache(URL + "014", true); + OfflineTest.checkCache(URL + "015", true); + OfflineTest.checkCache(URL + "016", true); + OfflineTest.checkCache(URL + "017", true); + OfflineTest.checkCache(URL + "018", true); + OfflineTest.checkCache(URL + "019", true); + OfflineTest.checkCache(URL + "020", true); + OfflineTest.checkCache(URL + "021", true); + OfflineTest.checkCache(URL + "022", true); + OfflineTest.checkCache(URL + "023", true); + OfflineTest.checkCache(URL + "024", true); + OfflineTest.checkCache(URL + "025", true); + OfflineTest.checkCache(URL + "026", true); + OfflineTest.checkCache(URL + "027", true); + OfflineTest.checkCache(URL + "028", true); + OfflineTest.checkCache(URL + "029", true); + OfflineTest.checkCache(URL + "030", true, function() { + OfflineTest.teardownAndFinish(); + }); +} + +if (OfflineTest.setup()) { + applicationCache.onerror = OfflineTest.failEvent; + applicationCache.oncached = OfflineTest.priv(manifestUpdated); +} + +SimpleTest.waitForExplicitFinish(); + +</script> + +</head> + +<body> + +</body> +</html> |