-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does ServiceWorker interact with non-"fully active" documents? #1594
Comments
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
WPT: web-platform-tests/wpt#31082 According to the wpt.fyi bot, the current behavior of the browsers are:
|
I think clients.claim() not evicting on firefox is a known bug. Although maybe I am thinking of this one.
That seems surprising. @asutherland? |
Thank you for bringing this to my attention! I have filed https://bugzilla.mozilla.org/show_bug.cgi?id=1735875 for us to investigate further. It's very cool to see the RemoteContext mechanism at work, especially since other mechanisms like BroadcastChannel could interfere with BFCache! |
Gecko-specific detail: Following up on my previous comment, per preliminary investigation by @smaug---- we are intentionally dropping ClientHandle actors on freeze but not re-establishing them subsequently on thaw, so we likely have a clear path to addressing the problem in a timely fashion. |
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
FYI we're aiming to land the WPTs at web-platform-tests/wpt#31082 soon, PTAL if you have time @asutherland @smaug---- :) |
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + Clients.claim(), Clients.matchAll() and unregister(). - Clients.claim() evicts pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache and should leave them controlled. Failing tests: - Safari/Firefox: Clients.claim() doesn't evict pages from BFCache. - Firefox: pages become uncontrolled after restored from BFCache. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + navigator.serviceWorker.controller, Clients.claim(), Clients.matchAll() and unregister(). Expected behavior: - navigator.serviceWorker.controller should remain non-null for previously controlled pages after restored from BFCache. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - Safari/Firefox: Clients.claim() doesn't evict pages from BFCache. - Firefox: pages become uncontrolled after restored from BFCache. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + navigator.serviceWorker.controller, Clients.claim(), Clients.matchAll() and unregister(). Expected behavior: - navigator.serviceWorker.controller should remain non-null for previously controlled pages after restored from BFCache. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - Safari/Firefox: Clients.claim() doesn't evict pages from BFCache. - Firefox: pages become uncontrolled after restored from BFCache. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds tests for BFCache + navigator.serviceWorker.controller, Clients.claim(), Clients.matchAll() and unregister(). Expected behavior: - navigator.serviceWorker.controller should remain non-null for previously controlled pages after restored from BFCache. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - Safari/Firefox: Clients.claim() doesn't evict pages from BFCache. - Firefox: pages become uncontrolled after restored from BFCache. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() shouldn't evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1008327}
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1008327}
…=testonly Automatic update from web-platform-tests [WPT] BFCache: service worker clients This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1008327} -- wpt-commits: e08e12d17b261deeb09ee1fa7669282281c14a1f wpt-pr: 31082
…=testonly Automatic update from web-platform-tests [WPT] BFCache: service worker clients This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1008327} -- wpt-commits: e08e12d17b261deeb09ee1fa7669282281c14a1f wpt-pr: 31082
This reverts commit 756b8281b5b76b2ae4561d3cf8c29a46689cf23f. Reason for revert: New tests are very flaky. Example: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylgELEgVGbGFrZSKKAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jb250cm9sbGVkLWFmdGVyLXJlc3RvcmUuaHR0cHMuaHRtbAw https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyjgELEgVGbGFrZSKCAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jbGllbnRzLW1hdGNoYWxsLmh0dHBzLmh0bWwM Original change's description: > [WPT] BFCache: service worker clients > > This CL adds service worker tests for BFCache: > > - navigator.serviceWorker.controller > - Fetch interception > - Clients.claim() > - Clients.matchAll() and > - unregister(). > > Expected behavior: > > - Controlled pages should remain controlled after > restored from BFCache, i.e. > navigator.serviceWorker.controller should remain non-null > and fetch should be intercepted. > - Clients.claim() should evict pages > that would be affected from BFCache. > - Clients.matchAll() shouldn't list pages in BFCache. > - unregister() should evict controlled pages from BFCache. > > Failing tests: > > - service-worker-clients-claim.https.html: > On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. > - service-worker-controlled-after-restore.https.html: > On Firefox, fetches are not intercepted after restored from > BFCache while `navigator.serviceWorker.controller` is non-null. > - service-worker-unregister.https.html: > Controlled pages aren't evicted by unregister() (all browsers). > > Bug: 1107415, 1204228, w3c/ServiceWorker#1594 > Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 > Reviewed-by: Rakina Zata Amni <[email protected]> > Reviewed-by: Ben Kelly <[email protected]> > Commit-Queue: Hiroshige Hayashizaki <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1008327} Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c
This reverts commit 756b828. Reason for revert: New tests are very flaky. Example: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylgELEgVGbGFrZSKKAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jb250cm9sbGVkLWFmdGVyLXJlc3RvcmUuaHR0cHMuaHRtbAw https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyjgELEgVGbGFrZSKCAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jbGllbnRzLW1hdGNoYWxsLmh0dHBzLmh0bWwM Original change's description: > [WPT] BFCache: service worker clients > > This CL adds service worker tests for BFCache: > > - navigator.serviceWorker.controller > - Fetch interception > - Clients.claim() > - Clients.matchAll() and > - unregister(). > > Expected behavior: > > - Controlled pages should remain controlled after > restored from BFCache, i.e. > navigator.serviceWorker.controller should remain non-null > and fetch should be intercepted. > - Clients.claim() should evict pages > that would be affected from BFCache. > - Clients.matchAll() shouldn't list pages in BFCache. > - unregister() should evict controlled pages from BFCache. > > Failing tests: > > - service-worker-clients-claim.https.html: > On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. > - service-worker-controlled-after-restore.https.html: > On Firefox, fetches are not intercepted after restored from > BFCache while `navigator.serviceWorker.controller` is non-null. > - service-worker-unregister.https.html: > Controlled pages aren't evicted by unregister() (all browsers). > > Bug: 1107415, 1204228, w3c/ServiceWorker#1594 > Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 > Reviewed-by: Rakina Zata Amni <[email protected]> > Reviewed-by: Ben Kelly <[email protected]> > Commit-Queue: Hiroshige Hayashizaki <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1008327} Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708190 Bot-Commit: Rubber Stamper <[email protected]> Owners-Override: Phillis Tang <[email protected]> Auto-Submit: Phillis Tang <[email protected]> Commit-Queue: Phillis Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1014735}
This reverts commit 756b8281b5b76b2ae4561d3cf8c29a46689cf23f. Reason for revert: New tests are very flaky. Example: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylgELEgVGbGFrZSKKAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jb250cm9sbGVkLWFmdGVyLXJlc3RvcmUuaHR0cHMuaHRtbAw https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyjgELEgVGbGFrZSKCAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jbGllbnRzLW1hdGNoYWxsLmh0dHBzLmh0bWwM Original change's description: > [WPT] BFCache: service worker clients > > This CL adds service worker tests for BFCache: > > - navigator.serviceWorker.controller > - Fetch interception > - Clients.claim() > - Clients.matchAll() and > - unregister(). > > Expected behavior: > > - Controlled pages should remain controlled after > restored from BFCache, i.e. > navigator.serviceWorker.controller should remain non-null > and fetch should be intercepted. > - Clients.claim() should evict pages > that would be affected from BFCache. > - Clients.matchAll() shouldn't list pages in BFCache. > - unregister() should evict controlled pages from BFCache. > > Failing tests: > > - service-worker-clients-claim.https.html: > On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. > - service-worker-controlled-after-restore.https.html: > On Firefox, fetches are not intercepted after restored from > BFCache while `navigator.serviceWorker.controller` is non-null. > - service-worker-unregister.https.html: > Controlled pages aren't evicted by unregister() (all browsers). > > Bug: 1107415, 1204228, w3c/ServiceWorker#1594 > Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 > Reviewed-by: Rakina Zata Amni <[email protected]> > Reviewed-by: Ben Kelly <[email protected]> > Commit-Queue: Hiroshige Hayashizaki <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1008327} Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708190 Bot-Commit: Rubber Stamper <[email protected]> Owners-Override: Phillis Tang <[email protected]> Auto-Submit: Phillis Tang <[email protected]> Commit-Queue: Phillis Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1014735}
This reverts commit 756b8281b5b76b2ae4561d3cf8c29a46689cf23f. Reason for revert: New tests are very flaky. Example: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylgELEgVGbGFrZSKKAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jb250cm9sbGVkLWFmdGVyLXJlc3RvcmUuaHR0cHMuaHRtbAw https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyjgELEgVGbGFrZSKCAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jbGllbnRzLW1hdGNoYWxsLmh0dHBzLmh0bWwM Original change's description: > [WPT] BFCache: service worker clients > > This CL adds service worker tests for BFCache: > > - navigator.serviceWorker.controller > - Fetch interception > - Clients.claim() > - Clients.matchAll() and > - unregister(). > > Expected behavior: > > - Controlled pages should remain controlled after > restored from BFCache, i.e. > navigator.serviceWorker.controller should remain non-null > and fetch should be intercepted. > - Clients.claim() should evict pages > that would be affected from BFCache. > - Clients.matchAll() shouldn't list pages in BFCache. > - unregister() should evict controlled pages from BFCache. > > Failing tests: > > - service-worker-clients-claim.https.html: > On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. > - service-worker-controlled-after-restore.https.html: > On Firefox, fetches are not intercepted after restored from > BFCache while `navigator.serviceWorker.controller` is non-null. > - service-worker-unregister.https.html: > Controlled pages aren't evicted by unregister() (all browsers). > > Bug: 1107415, 1204228, w3c/ServiceWorker#1594 > Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 > Reviewed-by: Rakina Zata Amni <[email protected]> > Reviewed-by: Ben Kelly <[email protected]> > Commit-Queue: Hiroshige Hayashizaki <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1008327} Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708190 Bot-Commit: Rubber Stamper <[email protected]> Owners-Override: Phillis Tang <[email protected]> Auto-Submit: Phillis Tang <[email protected]> Commit-Queue: Phillis Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1014735}
This CL adds service worker tests for BFCache: - navigator.serviceWorker.controller - Fetch interception - Clients.claim() - Clients.matchAll() and - unregister(). Expected behavior: - Controlled pages should remain controlled after restored from BFCache, i.e. navigator.serviceWorker.controller should remain non-null and fetch should be intercepted. - Clients.claim() should evict pages that would be affected from BFCache. - Clients.matchAll() shouldn't list pages in BFCache. - unregister() should evict controlled pages from BFCache. Failing tests: - service-worker-clients-claim.https.html: On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. - service-worker-controlled-after-restore.https.html: On Firefox, fetches are not intercepted after restored from BFCache while `navigator.serviceWorker.controller` is non-null. - service-worker-unregister.https.html: Controlled pages aren't evicted by unregister() (all browsers). Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1008327} NOKEYCHECK=True GitOrigin-RevId: 756b8281b5b76b2ae4561d3cf8c29a46689cf23f
This reverts commit 756b8281b5b76b2ae4561d3cf8c29a46689cf23f. Reason for revert: New tests are very flaky. Example: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylgELEgVGbGFrZSKKAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jb250cm9sbGVkLWFmdGVyLXJlc3RvcmUuaHR0cHMuaHRtbAw https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyjgELEgVGbGFrZSKCAWNocm9taXVtQGJsaW5rX3dlYl90ZXN0c0BleHRlcm5hbC93cHQvaHRtbC9icm93c2Vycy9icm93c2luZy10aGUtd2ViL2JhY2stZm9yd2FyZC1jYWNoZS9zZXJ2aWNlLXdvcmtlci1jbGllbnRzLW1hdGNoYWxsLmh0dHBzLmh0bWwM Original change's description: > [WPT] BFCache: service worker clients > > This CL adds service worker tests for BFCache: > > - navigator.serviceWorker.controller > - Fetch interception > - Clients.claim() > - Clients.matchAll() and > - unregister(). > > Expected behavior: > > - Controlled pages should remain controlled after > restored from BFCache, i.e. > navigator.serviceWorker.controller should remain non-null > and fetch should be intercepted. > - Clients.claim() should evict pages > that would be affected from BFCache. > - Clients.matchAll() shouldn't list pages in BFCache. > - unregister() should evict controlled pages from BFCache. > > Failing tests: > > - service-worker-clients-claim.https.html: > On Safari/Firefox, Clients.claim() doesn't evict pages from BFCache. > - service-worker-controlled-after-restore.https.html: > On Firefox, fetches are not intercepted after restored from > BFCache while `navigator.serviceWorker.controller` is non-null. > - service-worker-unregister.https.html: > Controlled pages aren't evicted by unregister() (all browsers). > > Bug: 1107415, 1204228, w3c/ServiceWorker#1594 > Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3201011 > Reviewed-by: Rakina Zata Amni <[email protected]> > Reviewed-by: Ben Kelly <[email protected]> > Commit-Queue: Hiroshige Hayashizaki <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1008327} Bug: 1107415, 1204228, w3c/ServiceWorker#1594 Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3708190 Bot-Commit: Rubber Stamper <[email protected]> Owners-Override: Phillis Tang <[email protected]> Auto-Submit: Phillis Tang <[email protected]> Commit-Queue: Phillis Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1014735} NOKEYCHECK=True GitOrigin-RevId: 334fb112459f785a9d6721f5b332df63fe7262c2
Currently the ServiceWorker specification does not specify how it interacts with non-"fully active" (bfcached) documents/window clients.
We recommend following the WIP guide we've made on handling non-fully active documents, by adding "fully active" checks so that we won't include clients with non-fully active documents, and if necessary trigger discarding of the document (e.g. for Clients.claim()). This is already how it behaves in Chrome's implementation of BFCache, and @hiroshige-g will also publish some WPTs soon to show how it behaves in various browsers.
cc @domenic @fergal @altimin
The text was updated successfully, but these errors were encountered: