-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change
Tests.prototype.all_done
to require either tests or pending …
…remotes `Tests.prototype.all_done` used to treat the presence of at least one test as a necessary condition for all tests to be done. This would be false in cases where an exception is thrown inside the `setup` function, but the code path that runs in that case doesn't use the `all_done()` function. However, if an exception is thrown inside the `setup` function in a worker test, `tests.all_done()` is called in that code path, which results in the completion message from the worker being ignored. This change fixes this by changing the condition to require the presence of either tests or remote contexts. For service worker tests, however, that is not enough, since service worker registration is asynchronous. This change lets the `fetch_tests_from_worker` function take a promise or an async function that returns the worker, and it guarantees that the test won't be considered complete until the promise is resolved. The HTML boilerplate for service worker tests is also changed in turn. Closes #29777.
- Loading branch information
Andreu Botella
committed
Aug 11, 2021
1 parent
5998702
commit 8b3feba
Showing
3 changed files
with
32 additions
and
16 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