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

Service worker: Fail if fetch event has targetClientId #29213

Merged
merged 2 commits into from
Jun 7, 2021

Conversation

jakearchibald
Copy link
Contributor

On FetchEvent, targetClientId was renamed to replacesClientId. Unfortunately Safari shipped targetClientId before we made the change, and didn't realise due to some miscommunication.

This test fails in browsers that have targetClientId.

Unfortunately there aren't any proper tests for replacesClientId (or targetClientId), but that's for another day.

@jakearchibald
Copy link
Contributor Author

jakearchibald commented Jun 4, 2021

@foolip
Copy link
Member

foolip commented Jun 4, 2021

Rather than introducing a failure in an existing test, how about a historical.https.serviceworker.js that that just does assert_false('targetClientId' in FetchEvent.prototype)?

@jakearchibald
Copy link
Contributor Author

Heh yeah, that is simpler

@@ -17,6 +17,8 @@
const registration =
await service_worker_unregister_and_register(t, worker, scope);
await wait_for_state(t, registration.installing, 'activated');

// This will happen after all other tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep this comment, or revert that too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep that if that's ok. It confused me when reading those tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, just making sure it was intentional.

@foolip foolip merged commit 7ba7f58 into master Jun 7, 2021
@foolip foolip deleted the sw-targetclient-deprecate branch June 7, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants