diff options
Diffstat (limited to 'dom/tests/mochitest/ajax/offline/test_bug744719.html')
-rw-r--r-- | dom/tests/mochitest/ajax/offline/test_bug744719.html | 77 |
1 files changed, 77 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 0000000000..815d3db58e --- /dev/null +++ b/dom/tests/mochitest/ajax/offline/test_bug744719.html @@ -0,0 +1,77 @@ +<html xmlns="http://www.w3.org/1999/xhtml" manifest="/tests/dom/tests/mochitest/ajax/offline/744719.cacheManifest"> +<head> +<title>parallel load</title> + +<script 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() +{ +ok(window.location.href, "my loc" + window.location.href); + OfflineTest.checkCache("https://example.com/tests/dom/tests/mochitest/ajax/offline/744719.cacheManifest", true); + OfflineTest.checkCache("https://example.com/tests/SimpleTest/SimpleTest.js", true); + OfflineTest.checkCache("https://example.com/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", true); + + var URL = "https://example.com/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> |