Currently all fetch requests on SW controlled workers directly go to network. claim-worker-fetch.https.html is the WPT test for this bug.
I'm working on this CL: https://chromium-review.googlesource.com/c/chromium/src/+/727826
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6760c7cce26a88e252edd85f894e1b4dd0d50a21 commit 6760c7cce26a88e252edd85f894e1b4dd0d50a21 Author: Tsuyoshi Horo <horo@chromium.org> Date: Fri Oct 27 05:41:27 2017 S13nServiceWorker: Support subresource load interception work with Dedicated Workers This CL introduces ServiceWorkerContainerHost::CloneForWorker() Mojo IPC which is called on the main thread to get the cloned Mojo pointer of the container host. The pointer will be passed to dedicated/shared worker. ServiceWorkerContainerHost::GetControllerServiceWorker() is calld from the worker thread to send FetchEvents to the service worker for subresource loading. Bug: 776277 Change-Id: I92926643867491b0e75e68906f612c004b809631 Reviewed-on: https://chromium-review.googlesource.com/727826 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/master@{#512098} [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/browser/service_worker/embedded_worker_instance_unittest.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/browser/service_worker/service_worker_provider_host.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/browser/service_worker/service_worker_provider_host.h [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/common/service_worker/service_worker_container.mojom [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/render_frame_impl.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/service_worker/service_worker_provider_context.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/service_worker/service_worker_provider_context.h [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/service_worker/worker_fetch_context_impl.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/service_worker/worker_fetch_context_impl.h [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/content/renderer/shared_worker/embedded_shared_worker_stub.cc [modify] https://crrev.com/6760c7cce26a88e252edd85f894e1b4dd0d50a21/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService
Apologies, applied the wrong component in bulk.
Comment 1 by falken@chromium.org
, Oct 19 2017