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

moz-wptsync-bot commented Oct 11, 2019

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 left a comment

Already reviewed downstream.

@jgraham

This comment has been minimized.

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
10 of 11 checks passed
10 of 11 checks passed
Taskcluster (pull_request) TaskGroup: failure
Details
wpt.fyi - firefox[experimental] Firefox results
Details
Azure Pipelines Build #20191011.167 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
upstream/gecko Landed on mozilla-central
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - safari[experimental] Safari results
Details
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1578919 branch Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.