diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html')
-rw-r--r-- | testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html b/testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html new file mode 100644 index 000000000..67a690ddc --- /dev/null +++ b/testing/web-platform/tests/service-workers/stub-3.2.5-navigator-service-worker-ready.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<title>Service Workers: ready</title> + <head> + <link rel="help" href="https://w3c.github.io/ServiceWorker/#navigator-service-worker-ready"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + + </head> + <body> + +<!-- + +`navigator.serviceWorker.ready` attribute must return the result of running +these steps: + +1. Let `promise` be a newly-created [promise][1]. +2. Return `promise`. +3. Run the following steps asynchronously: + 1. Let `registration` be the result of running [_ScopeMatch + algorithm][2] with document's url as its argument. + 2. If `registration` is null, then: + 1. Wait for the document to have a matching [registration][3]. + 3. If the [registration][3], represented by `registration`, for the + document has an [active worker][4], then: + 1. Resolve `promise` with the [ServiceWorker][5] object associated + with the [active worker][4]. + 2. Abort these steps. + 4. If the [registration][3], represented by `registration`, for the + document has a [worker in waiting][6], then: + 1. Resolve `promise` with the [ServiceWorker][5] object associated + with the [worker in waiting][6]. + 2. Abort these steps. + 5. Wait until the [registration][3], represented by `registration`, + for the document acquires a [worker in waiting][6] through a new + [installation process][7]. + 6. Resolve `promise` with the [ServiceWorker][5] object associated + with the [worker in waiting][6]. +Note that `ready` attribute is desinged in a way that the returned [promise][1] +will never reject. Instead, it waits until the [promise][1] resolves with a +newly installed [worker in waiting][6]. Hence, the `state` of the acquired +[`ServiceWorker`][8] object is either `installed`, `activating` or `activated`. + + + +[1]: http://goo.gl/3TobQS +[2]: #scope-match-algorithm +[3]: #registration +[4]: #active-worker +[5]: #service-worker-interface +[6]: #worker-in-waiting +[7]: #installation-process +[8]: #service-worker + +--> + + + + <script> + test(function() { + // not_implemented(); + }, "There are no tests for section ready so far."); + </script> + + </body> +</html> + |