Closed Bug 1181036 Opened 10 years ago Closed 10 years ago

"Harness status: OK" + failing test when running "registration-service-worker-attributes.https.html" test

Categories

(Testing :: web-platform-tests, defect)

defect
Not set
normal

Tracking

(firefox42 affected, firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox42 --- affected
firefox43 --- fixed

People

(Reporter: noemi, Assigned: nsm)

References

Details

Attachments

(1 file)

Checked with 7/6 master build Test run such as |./mach web-platform-tests _mozilla/service-workers/service-worker/registration-service-worker-attributes.https.html| Result: * Harness status: OK * Found 1 tests * 1 Fail: ** installing/waiting/active after registration *** assert_unreached: unexpected rejection: registration.waiting is null Reached unreachable code unreached_rejection/<@https://web-platform.test:8443/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:42:7 Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:1363:20 Test.prototype.step_func/<@https://web-platform.test:8443/resources/testharness.js:1387:1 Promise*@https://web-platform.test:8443/_mozilla/service-workers/service-worker/registration-service-worker-attributes.https.html:11:5 Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:1363:20 async_test@https://web-platform.test:8443/resources/testharness.js:513:13 @https://web-platform.test:8443/_mozilla/service-workers/service-worker/registration-service-worker-attributes.https.html:6:1 * Traces: https://pastebin.mozilla.org/8838627
Summary: "Harness status: OK" + failing test when running wpt "registration-service-worker-attributes.https.html" test → "Harness status: OK" + failing test when running "registration-service-worker-attributes.https.html" test
Component: DOM: Service Workers → web-platform-tests
Product: Core → Testing
I think the test implements some Blink specific behaviour here but alternative interpretations are possible. The [[Install]] algorithm states towards the end (after it has set waiting's state to INSTALLED), something along the lines of "wait until there are no controlling documents, then activate this worker", which means [[Activate]] can run immediately after [[Install]]. Since this happens in the same thread as the ServiceWorkerRegistration in firefox, this means that a worker can go from installing -> activating with the page unable to observe the intermediate waiting state. In Blink, due to the multiprocess model, the event loop in the content process spins between the waiting -> active transition, i.e.: 1) Parent process finishes [[Install]] leading to a message being sent to child processes to update there 'registration.waiting'. Child then sends event 'statechange', the wpt test runner wait_for_state()'s Promise is resolve()d. 2) Child event loop spins, Promise resolution is noted, test passes. 3) Parent continues with [[Activate]]. and the page can reliably observe that. I don't know who is correct in this case, nor do I know how bug 1182117 will change this for firefox.
Bug 1181036 - Fix waiting/active expectations. r?bkelly Update web-platform-tests expected data
Attachment #8655148 - Flags: review?(bkelly)
Hi, Patch provided by Nikhil so assigning this to him. Please, feel free to change it as needed. Thanks!
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Attachment #8655148 - Flags: review?(bkelly) → review+
Comment on attachment 8655148 [details] MozReview Request: Bug 1181036 - Fix waiting/active expectations. r=bkelly https://reviewboard.mozilla.org/r/17841/#review16009 ::: testing/web-platform/mozilla/tests/service-workers/service-worker/registration-service-worker-attributes.https.html:60 (Diff revision 1) > - assert_equals(registration.active.scriptURL, expected_url, > + // According to spec, the Update State step is immediately followed nit: I found this comment a little confusing. Maybe clarify that the Clear Registration algorithm sets the active worker to null immedately after the Update State step.
Comment on attachment 8655148 [details] MozReview Request: Bug 1181036 - Fix waiting/active expectations. r=bkelly Bug 1181036 - Fix waiting/active expectations. r=bkelly Update web-platform-tests expected data
Attachment #8655148 - Attachment description: MozReview Request: Bug 1181036 - Fix waiting/active expectations. r?bkelly → MozReview Request: Bug 1181036 - Fix waiting/active expectations. r=bkelly
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Hi, just checked on m-c (139446daedab revision) and the tes successfully runs. Thanks for fixing it!. Summary Harness status: OK Found 1 tests 1 Pass Details Result Test Name Pass installing/waiting/active after registration
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: