Closed Bug 1065367 Opened 6 years ago Closed 6 years ago

Implement a mochitest for ServiceWorkerGlobalScope::Unregister()

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: baku, Assigned: baku)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

This needs bug 982726.
Attached patch test_unregister.patch (obsolete) — Splinter Review
I really don't like the setInterval thing. Do we have a spec bug about something better?
Attachment #8488238 - Flags: review?(nsm.nikhil)
Comment on attachment 8488238 [details] [diff] [review]
test_unregister.patch

Review of attachment 8488238 [details] [diff] [review]:
-----------------------------------------------------------------

If unregister.html initiates the test by sending GO to the controller, the worker can just wait for onmessage before calling getServiced() right? When it receives an onmessage, in this specific test, it will have a client, since the client is the only one sending the message.

::: dom/workers/test/serviceworkers/test_workerUnregister.html
@@ +19,5 @@
> +
> +  function waitForMessages(sw) {
> +    var p = new Promise(function(resolve, reject) {
> +      window.onmessage = function(e) {
> +        if (e.data === "READY") {

Not required
Attachment #8488238 - Flags: review?(nsm.nikhil)
Attachment #8488238 - Attachment is obsolete: true
Attachment #8489401 - Flags: review?(nsm.nikhil)
https://hg.mozilla.org/mozilla-central/rev/6ca99351d8e3
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.