summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/resources/subframe-4.html
blob: da036798a9ddbe5d98e9d4dbf92c4bf31e740739 (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
<html manifest="subframes-4.manifest">
<script>
function test()
{
    applicationCache.onnoupdate = null;

    try {
        var req = new XMLHttpRequest;
        req.open("GET", "simple.txt", false);
        req.send(null);
        alert("FAIL, unexpected response: " + req.responseText);
    } catch (ex) {
        // Loading should fail, because simple.txt is not in cache manifest.
        parent.postMessage("allDone", "*");
    }
}

// The cache has been fully created before the iframe was inserted, and the manifest didn't change.
applicationCache.onnoupdate = test;

applicationCache.onupdateready = function() { alert("Unexpected updateready event") }
applicationCache.oncached = function() { alert("Unexpected cached event") }
applicationCache.onerror = function() { alert("Unexpected error event") }

</script>
</html>