-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 fetch abort tests #7674
base: master
Are you sure you want to change the base?
Service worker fetch abort tests #7674
Conversation
@mattto I'm not getting a fetch event in the navigation preload test, which I would expect. Have I done some really silly, or have I discovered a weird Chrome bug? |
Build PASSEDStarted: 2017-11-24 14:37:44 View more information about this build on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this looks okay, though I'm far less of an expert. It seems it might be good to cleanup the repeated boilerplate in the promise_tests. That might make them a little easier to read or at least understand the essential difference between them.
} | ||
|
||
promise_test(async t => { | ||
await reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a test_cleanup step of sorts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it doesn't support async cleanup steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah okay. A single comment to that effect would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe an issue to add promise_cleanup?
The CI is complaining about |
It should still be test.step_timeout to deal with timeout multipliers (when tests are run on slow platforms for example). |
342c1e0
to
fbfa457
Compare
I've removed the use of
My assumption is that the abort will always reach the service worker before the channel broadcast. Is this a safe assumption? |
@mkruisselbrink could I get a review on the fixes? |
@jakearchibald We have a test written that might cover some of this as well: https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=1394102&attachment=8903478 Do the tests here cover that case? If so, I'm inclined to just defer to these tests. |
No. This kind of thing is probably why setTimeout is banned in the first place. This will make the test flaky. If you need ordering guarantees, please enforce them explicitly. |
Tests for w3c/ServiceWorker#1178.