Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[service-workers] Return value in cleanup (#13163)
Previously, many tests un-registered service workers using the testharness.js API `add_cleanup` without returning the promise which tracked the operation. While this ensured the operation was started at the completion of the test, it did not guarantee that the operation would be completed before the test was considered "complete." In automation scenarios where many tests are executed in rapid succession, this enabled a race condition: the navigation could interrupt the un-registration process. In order to account for the possibility of registrations that persisted from previous test failures, the tests included "setup" code to defensively un-register such workers. The `Test#add_cleanup` method was recently extended to support asynchronous "clean up" operations [1]. Use that API to ensure tests are not considered "complete" until after service worker un-registration is done. [1] #8748
- Loading branch information
1 parent
eb68211
commit 7897f9d
Showing
9 changed files
with
11 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters