Closed Bug 1413056 Opened 7 years ago Closed 7 years ago

test_bug1408734.html needs to wait for service worker to activate

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- fixed
firefox58 --- fixed

People

(Reporter: bkelly, Assigned: edenchuang)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

Looks like test_bug1408734.html added another test case using the pattern that was fixed in bug 1411746.  Basically, before we trigger the claim() call we need to wait for the service worker to activate.

Ironically, I both reviewed this test and also implemented the fix it was missing.  I should have caught this.  Sorry!

Eden, do you have any time to look at this today?  If not, I can take it tomorrow.  No worries either way.  Thanks!
Flags: needinfo?(echuang)
Of course. I will update the test case today.
Assignee: nobody → echuang
Status: NEW → ASSIGNED
Flags: needinfo?(echuang)
Attached patch Bug 1413056 - (obsolete) — Splinter Review
Tom, could you help review this patch?
Attachment #8923657 - Attachment is obsolete: true
Attachment #8923659 - Flags: review?(ttung)
Comment on attachment 8923659 [details] [diff] [review]
Bug 1413056 - Using utils.js in test_bug1408734.html for waitForState and waitForControlled. r?tt

Change reviewer to bkelly.
Attachment #8923659 - Flags: review?(ttung) → review?(bkelly)
Comment on attachment 8923659 [details] [diff] [review]
Bug 1413056 - Using utils.js in test_bug1408734.html for waitForState and waitForControlled. r?tt

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

LGTM, just remove the extra empty line. Thanks!

::: dom/workers/test/serviceworkers/test_bug1408734.html
@@ +31,5 @@
>    // register a service worker
>    let registration = await navigator.serviceWorker.register("fetch.js", {scope: "./"});
> +  let sw = registration.installing || registration.active;
> +
> +

nit: remove the extra empty line here.
Attachment #8923659 - Flags: feedback+
Comment on attachment 8923659 [details] [diff] [review]
Bug 1413056 - Using utils.js in test_bug1408734.html for waitForState and waitForControlled. r?tt

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

Thanks!
Attachment #8923659 - Flags: review?(bkelly) → review+
Keywords: checkin-needed
I've run this through try a number of times in bug 1293277.  For example, this push includes it:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e3038dc4655896649965c0a6ed5d9c5b2ffb95cc
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a137a0d96fb6
Use utils.js in test_bug1408734.html for waitForState and waitForControlled. r=bkelly
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a137a0d96fb6
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: