Skip to content
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

Open
rakina opened this issue May 20, 2021 · 5 comments
Open

How does ServiceWorker interact with non-"fully active" documents? #1594

rakina opened this issue May 20, 2021 · 5 comments
Assignees

Comments

@rakina
Copy link
Member

rakina commented May 20, 2021

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

@mfalken mfalken self-assigned this Jun 10, 2021
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 14, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
@hiroshige-g
Copy link

hiroshige-g commented Oct 14, 2021

WPT: web-platform-tests/wpt#31082

According to the wpt.fyi bot, the current behavior of the browsers are:

  • Clients.matchAll({ includeUncontrolled: true, type: 'all' }): doesn't include BFCached pages, and does include pages restored from BFCache (Chrome/Firefox/Safari).
  • Clients.claim(): When called while a page is BFCached, the page is evicted from BFCache (Chrome) or the page is ignored/not claimed (Firefox/Safari).
  • Other: on Firefox, after a page is restored from BFCache, the page seems uncontrolled by service workers (even if it was controlled before BFCached). Is this a known issue?

@wanderview
Copy link
Member

Clients.claim(): When called while a page is BFCached, the page is evicted from BFCache (Chrome) or the page is ignored/not claimed (Firefox/Safari).

I think clients.claim() not evicting on firefox is a known bug. Although maybe I am thinking of this one.

Other: on Firefox, after a page is restored from BFCache, the page seems uncontrolled by service workers (even if it was controlled before BFCached). Is this a known issue?

That seems surprising. @asutherland?

@asutherland
Copy link

asutherland commented Oct 14, 2021

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!

@asutherland
Copy link

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.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 19, 2021
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 7, 2022
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
@rakina
Copy link
Member Author

rakina commented Feb 15, 2022

FYI we're aiming to land the WPTs at web-platform-tests/wpt#31082 soon, PTAL if you have time @asutherland @smaug---- :)

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
This CL adds tests for BFCache +
Clients.claim(), Clients.matchAll() and unregister().

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I73233cf917e31dd91b974823d5490d0190f0eade
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 17, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 18, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 27, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 27, 2022
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
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 27, 2022
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 <rakina@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008327}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 27, 2022
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 <rakina@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008327}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 9, 2022
…=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 <rakina@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008327}

--

wpt-commits: e08e12d17b261deeb09ee1fa7669282281c14a1f
wpt-pr: 31082
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Jun 10, 2022
…=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 <rakina@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008327}

--

wpt-commits: e08e12d17b261deeb09ee1fa7669282281c14a1f
wpt-pr: 31082
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 15, 2022
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 <rakina@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1008327}

Bug: 1107415, 1204228, w3c/ServiceWorker#1594
Change-Id: I56ac20a492e2b1716d27867dc9c113b097833a6c
aarongable pushed a commit to chromium/chromium that referenced this issue Jun 16, 2022
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 <rakina@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> 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 <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Phillis Tang <phillis@chromium.org>
Auto-Submit: Phillis Tang <phillis@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1014735}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 16, 2022
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 <rakina@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> 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 <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Phillis Tang <phillis@chromium.org>
Auto-Submit: Phillis Tang <phillis@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1014735}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 16, 2022
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 <rakina@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> 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 <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Phillis Tang <phillis@chromium.org>
Auto-Submit: Phillis Tang <phillis@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1014735}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
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 <rakina@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008327}
NOKEYCHECK=True
GitOrigin-RevId: 756b8281b5b76b2ae4561d3cf8c29a46689cf23f
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
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 <rakina@chromium.org>
> Reviewed-by: Ben Kelly <wanderview@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> 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 <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Phillis Tang <phillis@chromium.org>
Auto-Submit: Phillis Tang <phillis@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1014735}
NOKEYCHECK=True
GitOrigin-RevId: 334fb112459f785a9d6721f5b332df63fe7262c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants