Make custom protocol handlers work with service workers' fetch event
When a service worker intercepts a page that is later registered as a handler for a custom scheme via navigator.registerProtocolHandler, and if one clicks a link with this custom scheme, then the service worker is only able to intercept the page after reload. This CL fixes that bug by allowing the service worker to intercept the page after registering the custom scheme. A new browser unit test is added to verify this fix. This also makes the following manual WPT tests pass (*): protocol-handler-fragment-manual.https.html protocol-handler-path-manual.https.html protocol-handler-query-manual.https.html (*) https://w3c-test.org/html/webappapis/system-state-and-capabilities/the-navigator-object/ Bug: 522370 Change-Id: I95eda9025885838665e9735ac9f47a3d65d89aa8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379672 Commit-Queue: Frédéric Wang <fwang@igalia.com> Reviewed-by:Dominick Ng <dominickn@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#818416}
Showing
Please register or sign in to comment