Closed Bug 1589280 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 19746 - Pass outside fetch client settings object for ServiceWorkerContainer#register()

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(2 files)

Sync web-platform-tests PR 19746 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19746
Details from upstream follow.

Kenichi Ishibashi <bashi@chromium.org> wrote:

Pass outside fetch client settings object for ServiceWorkerContainer#register()

A brief summary of this plumbing is below:

blink::ServiceWorkerContainer::registerServiceWorker()
-> (IPC from a renderer to the browser)
-> content::ServiceworkerContextCore::RegisterServiceWorker()
Start a registration job asynchronously
Create a ServiceWorkerVersion and set the passed settings object
-> content::ServiceWorkerVersion::StartWorker()
-> (IPC from the browser to a renderer)
-> WebEmbeddedWorkerImpl::StartWorkerContext()
-> ServiceWorkerGlobalScope::FetchAndRunClassicScript()

Note that renderer processes of above don't have to be the same.

Bug: 937177
Change-Id: I4c137d10b7d5204151ae7eff8bfd8fdeb34fb365
Reviewed-on: https://chromium-review.googlesource.com/1861294
WPT-Export-Revision: 0f3fee8f5f085d001999c006cc2e2ae2651d797d

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 1 tests and 1 subtests

Firefox

OK : 1
FAIL: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
PASS: 1

New tests that's don't pass

/service-workers/service-worker/referer-toplevel-script-fetch.https.html
Referer of the top-level script fetch should be the document URL: Firefox: FAIL, Chrome: FAIL, Safari: PASS

Automatic update from web-platform-tests
Pass outside fetch client settings object for ServiceWorkerContainer#register()

A brief summary of this plumbing is below:

blink::ServiceWorkerContainer::registerServiceWorker()
-> (IPC from a renderer to the browser)
-> content::ServiceworkerContextCore::RegisterServiceWorker()
Start a registration job asynchronously
Create a ServiceWorkerVersion and set the passed settings object
-> content::ServiceWorkerVersion::StartWorker()
-> (IPC from the browser to a renderer)
-> WebEmbeddedWorkerImpl::StartWorkerContext()
-> ServiceWorkerGlobalScope::FetchAndRunClassicScript()

(Note that renderer processes of above don't have to be the same.)

This CL has behavioral changes. The 'Referer' header of the request
triggered by register() in a document will be changed.
Before this CL it was the url of the top-level script but after this CL
it is document's url. This behavior is consistent with the spec.

Bug: 937177
Change-Id: I4c137d10b7d5204151ae7eff8bfd8fdeb34fb365
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1861294
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709462}

--

wpt-commits: 98f4cb23e0c4e16c821721601f1c94c837803ee8
wpt-pr: 19746

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5b76b6ad6e91 [wpt PR 19746] - Pass outside fetch client settings object for ServiceWorkerContainer#register(), a=testonly https://hg.mozilla.org/integration/autoland/rev/6aad4d54732b [wpt PR 19746] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: