Closed Bug 1464980 Opened 2 years ago Closed 2 years ago
[wpt-sync] Sync PR 11216 - Worker: Clean up tests for module imports on dedicated workers using "export"
Sync web-platform-tests PR 11216 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/11216 Details from upstream follow. Hiroki Nakagawa <email@example.com> wrote: > Worker: Clean up tests for module imports on dedicated workers using "export" > > This is a clean-up CL for existing tests, and doesn't add new tests. > > Before this CL, the tests work as follows: the top-level script imports modules, > each module postMessage('LOADED') to the page on load, and the page waits for > them all. This pattern is easy to write but not easy to read because it's not > clear which modules are expected to be imported. Also, this pattern checks only > the number of imported modules, so a broken test, for example, importing a wrong > module can unexpectedly pass. > > To improve the situation, this CL stops using the pattern and instead make tests > propagate the list of imported modules from child scripts to the top-level > script. The top-level script sends the list to the page as a representative. > This is less error-prone and clarifies which modules are expected to be > imported. > > Change-Id: I08c4569b6dc69a1ecff6701df932e28dda6dc42a > Bug: 680046 > > Reviewed-on: https://chromium-review.googlesource.com/1075843 > WPT-Export-Revision: 01bd493e2d2c9bde2fc7625a9aad7557a16b94a1
PR 11216 applied with additional changes from upstream: 8b68722d31dafa4e6ea81c2d80bb65b6408d01f3
Component: web-platform-tests → DOM: Workers
Product: Testing → Core
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=07b44fa2981fefb5d4e8a8c95cb318f5ab4d1955
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3550ae5462ff57cbc810f29ad299ecdd41d2b9b
Ran 2 tests and 11 subtests PASS : 3 FAIL : 1 TIMEOUT: 2 ERROR : 2 NOTRUN : 5 New tests that have failures or other problems: /workers/modules/dedicated-worker-import-failure.html: ERROR Dynamic import for non-existent script should throw an exception.: TIMEOUT importScripts() on module worker should throw an exception.: FAIL /workers/modules/dedicated-worker-import.html Dynamic import and then static import.: NOTRUN Dynamic import.: NOTRUN Nested dynamic import.: NOTRUN Nested static import.: NOTRUN Static import and then dynamic import.: NOTRUN Static import.: TIMEOUT
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=8eace217b8923c2e9ce283240437e17d77f23506
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/2328200e4c9b [wpt PR 11216] - Worker: Clean up tests for module imports on dedicated workers using "export", a=testonly
You need to log in before you can comment on or make changes to this bug.