Closed
Bug 1181039
Opened 9 years ago
Closed 9 years ago
"Harness status: OK" + failing tests when running "getregistration.https.html" test
Categories
(Testing :: web-platform-tests, defect)
Testing
web-platform-tests
Tracking
(firefox42 affected, firefox43 fixed)
RESOLVED
FIXED
mozilla43
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/getregistration.https.html|
Result:
* Harness status: OK
* Found 5 tests
* 3 Pass
* 2 Fail:
** Register then getRegistration
*** assert_unreached: unexpected rejection: assert_equals: getRegistration should resolve with registration expected object "[object ServiceWorkerRegistration]" but got object "[object ServiceWorkerRegistration]" 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/getregistration.https.html:20: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/getregistration.https.html:17:1
** Register then getRegistration with a URL having a fragment
*** assert_unreached: unexpected rejection: assert_equals: getRegistration should resolve with registration expected object "[object ServiceWorkerRegistration]" but got object "[object ServiceWorkerRegistration]" 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/getregistration.https.html:38: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/getregistration.https.html:34:1
* Traces: https://pastebin.mozilla.org/8838631
Reporter | ||
Updated•9 years ago
|
Summary: "Harness status: OK" + failing tests when running wpt "getregistration.https.html" test → "Harness status: OK" + failing tests when running "getregistration.https.html" test
Reporter | ||
Updated•9 years ago
|
Component: DOM: Service Workers → web-platform-tests
Product: Core → Testing
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1181039 - ServiceWorkerRegistration must be compared by scope. r?bkelly
The spec for getRegistration() and getRegistrations() states:
"Resolve promise with a ServiceWorkerRegistration object, setting its
service worker client to service worker client, which represents
registration."
indicating a new ServiceWorkerRegistration is created per call. The existing
Blink test depends on Blink's implementation detail which caches the
registration.
Attachment #8649940 -
Flags: review?(bkelly)
Assignee | ||
Comment 2•9 years ago
|
||
Matt, just want to confirm that my interpretation is valid.
Flags: needinfo?(falken)
Comment 3•9 years ago
|
||
Right, the Blink test is actually incorrect. The spec has a [NewObject] attribute so we must always return a new object here.
Flags: needinfo?(falken)
Updated•9 years ago
|
Attachment #8649940 -
Flags: review?(bkelly) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8649940 [details]
MozReview Request: Bug 1181039 - ServiceWorkerRegistration must be compared by scope. r?bkelly
https://reviewboard.mozilla.org/r/16511/#review14927
Ship It!
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/8dfdf95523d51a96b4bdf9ea86830aa7f34c25ba
changeset: 8dfdf95523d51a96b4bdf9ea86830aa7f34c25ba
user: Nikhil Marathe <nsm.nikhil@gmail.com>
date: Wed Aug 19 08:55:01 2015 -0700
description:
Bug 1181039 - ServiceWorkerRegistration must be compared by scope. r=bkelly
The spec for getRegistration() and getRegistrations() states:
"Resolve promise with a ServiceWorkerRegistration object, setting its
service worker client to service worker client, which represents
registration."
indicating a new ServiceWorkerRegistration is created per call. The existing
Blink test depends on Blink's implementation detail which caches the
registration.
Reporter | ||
Comment 7•9 years ago
|
||
Patch provided by Nikhil so assigning this bug to him. Please feel free to change it if needed. Thanks!
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Comment 8•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Reporter | ||
Comment 9•9 years ago
|
||
Hi,
just checked on m-c (ba43a48d3c52 revision) and the tests successfully run. Thanks for fixing it!.
Summary
Harness status: OK
Found 5 tests
5 Pass
Details
Result Test Name
Pass getRegistration
Pass Register then getRegistration
Pass Register then getRegistration with a URL having a fragment
Pass getRegistration with a cross origin URL
Pass Register then Unregister then getRegistration
Comment 10•9 years ago
|
||
I'm very sorry, apparently the spec *does* require JS equality. I misunderstood the [NewObject] vs [SameObject] annotation. See https://code.google.com/p/chromium/issues/detail?id=523904#c9
Comment 11•9 years ago
|
||
(In reply to Matt Falkenhagen from comment #10)
> I'm very sorry, apparently the spec *does* require JS equality. I
> misunderstood the [NewObject] vs [SameObject] annotation. See
> https://code.google.com/p/chromium/issues/detail?id=523904#c9
I think its still an open spec issue:
https://github.com/slightlyoff/ServiceWorker/issues/416
But the consensus did seem to be for the same registration object.
Nikhil, do you remember all the tests we changed recently for this?
Flags: needinfo?(nsm.nikhil)
Comment 12•9 years ago
|
||
I wrote bug 1201127 to fix our various APIs to return the same registration objects.
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #11)
> (In reply to Matt Falkenhagen from comment #10)
> > I'm very sorry, apparently the spec *does* require JS equality. I
> > misunderstood the [NewObject] vs [SameObject] annotation. See
> > https://code.google.com/p/chromium/issues/detail?id=523904#c9
>
> I think its still an open spec issue:
>
> https://github.com/slightlyoff/ServiceWorker/issues/416
>
> But the consensus did seem to be for the same registration object.
>
> Nikhil, do you remember all the tests we changed recently for this?
answered in Bug 1201127
Flags: needinfo?(nsm.nikhil)
You need to log in
before you can comment on or make changes to this bug.
Description
•