diff options
Diffstat (limited to 'test/wpt/tests/service-workers/service-worker/activation-after-registration.https.html')
-rw-r--r-- | test/wpt/tests/service-workers/service-worker/activation-after-registration.https.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/wpt/tests/service-workers/service-worker/activation-after-registration.https.html b/test/wpt/tests/service-workers/service-worker/activation-after-registration.https.html new file mode 100644 index 0000000..29f97e3 --- /dev/null +++ b/test/wpt/tests/service-workers/service-worker/activation-after-registration.https.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>Service Worker: Activation occurs after registration</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<body> +<script> +promise_test(function(t) { + var scope = 'resources/blank.html'; + var registration; + + return service_worker_unregister_and_register( + t, 'resources/empty-worker.js', scope) + .then(function(r) { + t.add_cleanup(function() { + return service_worker_unregister(t, scope); + }); + + registration = r; + assert_equals( + r.installing.state, + 'installing', + 'worker should be in the "installing" state upon registration'); + return wait_for_state(t, r.installing, 'activated'); + }); +}, 'activation occurs after registration'); +</script> +</body> |