blob: 3b5f747d3c5fa3ce76eaa2228019bf6bdb4bc1c1 (
plain)
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
|
<html manifest="resources/wrong-signature.manifest">
<body>
<p>Test that a manifest served with a wrong signature isn't treated as such.</p>
<p>Should say SUCCESS:</p>
<div id=result></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText()
layoutTestController.waitUntilDone();
}
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function cacheCallback()
{
log("FAIL: An event was dispatched on window.applicationCache, even though it was not associated wuth any cache yet.");
}
function test()
{
// Wait for cache update to finish.
if (window.applicationCache.status != window.applicationCache.UNCACHED)
log("FAILURE: Unexpected cache status: " + window.applicationCache.status);
else
log("SUCCESS");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
applicationCache.addEventListener('cached', function() { log("cached"); cacheCallback() }, false);
applicationCache.addEventListener('noupdate', function() { log("noupdate"); cacheCallback() }, false);
applicationCache.addEventListener('error', test, false);
</script>
</body>
</html>
|