diff options
Diffstat (limited to 'LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html')
-rw-r--r-- | LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html b/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html new file mode 100644 index 0000000..e2565f7 --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.html @@ -0,0 +1,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> |