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

[Gecko Bug 1578919] Add test for handling of "pending" fetch events #19653

Merged
merged 1 commit into from Oct 15, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

This patch factors out some of the initial test case in
fetch-waits-for-activate.https.html (which only tests "pending" fetch events
for a navigation request) to share with a new test case that tests
"pending" fetch events for a subresource request with a request body.

Both tests in the file have a high-level structure of:

  1. Register a Service Worker and wait until its state is "activating" but don't
    let its state reach "activated".
  2. Fire a fetch event that will be controlled by that Service Worker, which
    should wait until the Service Worker's state advances to "activated".
  3. Wait for the fetch to see that the worker isn't "activated". This step isn't
    directly observable by content, so the test's method to determine this can
    have false posities (but should never cause the test to unexpectedly fail).
  4. Tell the Service Worker to advance to "activated".
  5. Verify the fetch that was dispatched while the Service Worker was
    "activating" is successfully handled.

Differential Revision: https://phabricator.services.mozilla.com/D49031

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1578919
gecko-commit: 0464faa83b959a5f00f2e6e7951d2818f419c6ac
gecko-integration-branch: autoland
gecko-reviewers: asuth

This patch factors out some of the initial test case in
fetch-waits-for-activate.https.html (which only tests "pending" fetch events
for a navigation request) to share with a new test case that tests
"pending" fetch events for a subresource request with a request body.

Both tests in the file have a high-level structure of:
1) Register a Service Worker and wait until its state is "activating" but don't
   let its state reach "activated".
2) Fire a fetch event that will be controlled by that Service Worker, which
   should wait until the Service Worker's state advances to "activated".
3) Wait for the fetch to see that the worker isn't "activated". This step isn't
   directly observable by content, so the test's method to determine this can
   have false posities (but should never cause the test to unexpectedly fail).
4) Tell the Service Worker to advance to "activated".
5) Verify the fetch that was dispatched while the Service Worker was
   "activating" is successfully handled.

Differential Revision: https://phabricator.services.mozilla.com/D49031

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1578919
gecko-commit: 0464faa83b959a5f00f2e6e7951d2818f419c6ac
gecko-integration-branch: autoland
gecko-reviewers: asuth
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

@jgraham
Copy link
Contributor

jgraham commented Oct 15, 2019

Not sure why it thinks that this didn't pass, since all the jobs are passing. Going to force merge.

@jgraham jgraham merged commit 1875674 into master Oct 15, 2019
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1578919 branch October 15, 2019 12:30
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.

None yet

4 participants