Closed
Bug 1451124
Opened 7 years ago
Closed 7 years ago
write a WPT verifying workers get their own client ID
Categories
(Core :: DOM: Service Workers, enhancement, P2)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file, 1 obsolete file)
I have an interop report from a site related to worker client ID values. The site is expecting the chrome's behavior where FetchEvent.clientId values coming from a dedicated worker match the owning document's clientId. This is not correct given the current spec.
In addition, it seems edge has matched chrome's non-spec behavior here.
We should get a WPT establishing the correct spec behavior ASAP to prevent further interop issues in the future.
Updated•7 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•7 years ago
|
||
Andrew, this is a WPT test that verifies a dedicated worker has its own client ID and does not share its parent window's client ID. The spec requires the FetchEvent.clientId to be the id for the "request's client":
https://fetch.spec.whatwg.org/#concept-request-client
I can't find where "request's client" is explicitly set, but things like step 1 here clearly expect it to hold worker clients, etc:
https://fetch.spec.whatwg.org/#fetching
https://treeherder.mozilla.org/#/jobs?repo=try&revision=54cb31d450e1b2d4978aa4ae6b5ff2db1281bd4a
Attachment #8964697 -
Flags: review?(bugmail)
Comment 2•7 years ago
|
||
Comment on attachment 8964697 [details] [diff] [review]
Add a WPT test to verify dedicated workers have a separate client ID from their owning document. r=asuth
Review of attachment 8964697 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/web-platform/tests/service-workers/service-worker/worker-client-id.https.html
@@ +34,5 @@
> +
> +promise_test(async function(t) {
> + const script = './resources/worker-client-id-worker.js';
> + const scope = './resources/worker-client-id';
> + const frame = scope + '/frame.html';
Per IRC discussion (thanks for clarifying!), please either explicitly add a comment that this is expected to 404 or respondWith an empty doc like you alternately proposed. Thanks!
Attachment #8964697 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8964697 -
Attachment is obsolete: true
Attachment #8964754 -
Flags: review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aed7d4d9be32
Add a WPT test to verify dedicated workers have a separate client ID from their owning document. r=asuth
Comment 5•7 years ago
|
||
Yep, Chrome and Edge are wrong here. Thanks for creating a test.
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment 7•7 years ago
|
||
Safari also gets this wrong. Demo: https://worker-client-id-demo.glitch.me/
Comment 8•7 years ago
|
||
Assignee | ||
Comment 9•7 years ago
|
||
James, is the wpt sync bot operational at the moment? I was hoping to get this synced to the other browsers.
Flags: needinfo?(james)
Comment 10•7 years ago
|
||
It's hit a case it doesn't handle, which blocks subsequent upstreams. I'm already on it, hopefully it will be unblocked today.
Flags: needinfo?(james)
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10418 for changes under testing/web-platform/tests
You need to log in
before you can comment on or make changes to this bug.
Description
•