1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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>
|