summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/different-origin-manifest.html
blob: b58c10a02264e7bb02a01cd542d91b0b46e7dd54 (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
<html manifest="http://localhost:8000/appcache/resources/empty.manifest">
<p>Test that a different origin manifest is completely ignored.</p>
<div id=result></div>
<script>
if (window.layoutTestController) {
    layoutTestController.waitUntilDone();
    layoutTestController.dumpAsText();
}

var result = document.getElementById("result");
var originalResult = result.innerHTML;

try {
    applicationCache.onchecking = function() { result.innerHTML += "FAIL: onchecking called. " }
    applicationCache.onerror = function() { result.innerHTML += "FAIL: onerror called" }
    applicationCache.onnoupdate = function() { result.innerHTML += "FAIL: onnoupdate called" }
    applicationCache.ondownloading = function() { result.innerHTML += "FAIL: ondownloading called" }
    applicationCache.onprogress = function() { result.innerHTML += "FAIL: onprogress called" }
    applicationCache.onupdateready = function() { result.innerHTML += "FAIL: onupdateready called" }
    applicationCache.oncached = function() { result.innerHTML += "FAIL: oncached called" }
    applicationCache.onobsolete = function() { result.innerHTML += "FAIL: onobsolete called" }
} catch (ex) {
    result.innerHTML += "FAIL: " + ex;
}
function done()
{
    if (result.innerHTML == originalResult)
        result.innerHTML = applicationCache.status == applicationCache.UNCACHED ? "PASS" : "FAIL: cache status in not UNCACHED";

    if (window.layoutTestController)
        layoutTestController.notifyDone();
}

setTimeout(done, 100);
</script>
</html>