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

Allow standalone serviceworker tests #17339

Open
jakearchibald opened this issue Jun 14, 2019 · 7 comments
Open

Allow standalone serviceworker tests #17339

jakearchibald opened this issue Jun 14, 2019 · 7 comments

Comments

@jakearchibald
Copy link
Contributor

If you want to create a test with boilerplate, it seems like you need to create a file like whatever.https.any.js, and then:

// META: global=!default,serviceworker
// …tests…

It seems a bit weird to go from .any. to "just service worker please". Should whatever.serviceworker.js imply "run this test as a service worker only"?

@foolip
Copy link
Member

foolip commented Jun 18, 2019

Perhaps all the keywords in https://web-platform-tests.org/writing-tests/testharness.html#multi-global-tests should be supported as part of the filename?

@jakearchibald
Copy link
Contributor Author

Seems reasonable.

@foolip
Copy link
Member

foolip commented Jun 19, 2019

@annevk you made some pretty big changes in #6792, and I think the code that would have to be updated was added in that PR. Did you have reasons then for not supporting .serviceworker.js?

@annevk
Copy link
Member

annevk commented Jun 19, 2019

Not particularly, it was not a use case I was accounting for I suspect.

@foolip
Copy link
Member

foolip commented Jun 19, 2019

@jakearchibald do you want to give this a go? I think at the very least you'd have to do some tinkering with path_replace in ServiceWorkersHandler, and probably a bunch of other places by trial and error.

@jakearchibald
Copy link
Contributor Author

I tried briefly before filing this issue and got a bit stuck, but I can give it another go.

@foolip
Copy link
Member

foolip commented Jun 19, 2019

@jakearchibald cool, please shout if it doesn't pan out, I've marked it backlog for now so that it doesn't regularly show up in triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants