diff options
Diffstat (limited to 'LayoutTests/http/tests/appcache/resources')
4 files changed, 41 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> diff --git a/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.manifest b/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.manifest new file mode 100644 index 0000000..6b48448 --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/origin-delete-iframe.manifest @@ -0,0 +1,6 @@ +CACHE MANIFEST + +# This adds ~13K to the app cache + +CACHE: +abe.png diff --git a/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.html b/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.html new file mode 100644 index 0000000..92cf1ff --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.html @@ -0,0 +1,9 @@ +<html manifest="origins-with-appcache-iframe.manifest"> +<script> +// iframe-1 is expected to succeed. +applicationCache.oncached = function() { parent.postMessage("created_cache", "*"); }; +applicationCache.onerror = function() { parent.postMessage("FAIL - error caching iframe, expected this to succeed", "*"); }; +applicationCache.onnoupdate = function() { parent.postMessage("FAIL - no update iframe, all caches should have been deleted before this test", "*"); }; + +</script> +</html> diff --git a/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.manifest b/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.manifest new file mode 100644 index 0000000..6b48448 --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/origins-with-appcache-iframe.manifest @@ -0,0 +1,6 @@ +CACHE MANIFEST + +# This adds ~13K to the app cache + +CACHE: +abe.png |