summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html
blob: e2565f764949ce782e57c08cd834525e10aea0af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html manifest="origin-delete-iframe.manifest">
<script>
// iframe-1 is expected to succeed.
applicationCache.oncached = function() { parent.postMessage("PASS - cached iframe-1", "*"); };
applicationCache.onerror = function() { parent.postMessage("FAIL - error caching iframe-1, expected this to succeed", "*"); };
applicationCache.onnoupdate = function() { parent.postMessage("FAIL - no update iframe-1, all caches should have been deleted before this test", "*"); };


function frameMessageReceived(event) {
    if (event.data === "appcache_status") {
        parent.postMessage("appcache_status=" + applicationCache.status, "*");
    } else {
        parent.postMessage("FAIL - unrecognized message", "*");
    }
}

window.addEventListener("message", frameMessageReceived, false);

</script>
</html>