diff options
Diffstat (limited to 'testing/web-platform/tests/service-workers/service-worker/resources/appcache-ordering.install.html')
-rw-r--r-- | testing/web-platform/tests/service-workers/service-worker/resources/appcache-ordering.install.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/appcache-ordering.install.html b/testing/web-platform/tests/service-workers/service-worker/resources/appcache-ordering.install.html new file mode 100644 index 000000000..428ad92c7 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/appcache-ordering.install.html @@ -0,0 +1,26 @@ +<html manifest="appcache-ordering.manifest"> +<script> +var handled = false; + +function installComplete() { + if (handled) + return; + handled = true; + window.parent.notify_appcache_installed(true); +} + +function installFailed() { + if (handled) + return; + handled = true; + window.parent.notify_appcache_installed(false); +} + +applicationCache.oncached = installComplete; +applicationCache.onnoupdate = installComplete; +applicationCache.onupdateready = installFailed; +applicationCache.onerror = installFailed; +applicationCache.onobsolete = installFailed; + +</script> +</html> |