Skip to content

Commit

Permalink
Bug 1924455 [wpt PR 48591] - [wpt] Fail `VideoTrackGenerator-with-win…
Browse files Browse the repository at this point in the history
…dow-tracks.https.html` faster, a=testonly

Automatic update from web-platform-tests
[wpt] Fail `VideoTrackGenerator-with-window-tracks.https.html` faster

`VideoTrackGenerator` is not exposed to workers, which currently causes
the test to hang. Surface worker errors to the `promise_test()`s
instead.

Drive-by: always revoke the temporary script URL.

Bug: 40058895
Change-Id: Id0e3830abadecac7c76853235a09b201fdad1af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5922435
Auto-Submit: Jonathan Lee <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Commit-Queue: Jonathan Lee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1368294}

--

wpt-commits: 302e6e04c6c54bf3891e6a6a15a2e04e3f72bb52
wpt-pr: 48591
  • Loading branch information
jonathan-j-lee authored and moz-wptsync-bot committed Oct 18, 2024
1 parent 587e936 commit 81a31b7
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ <h1 class="instructions">Description</h1>
const blob = new Blob([script], { type: 'text/javascript' });
const url = URL.createObjectURL(blob);
const worker = new Worker(url);
await new Promise(resolve => worker.onmessage = () => {
resolve();
});
URL.revokeObjectURL(url);
return worker;
try {
await new Promise((resolve, reject) => {
worker.onmessage = resolve;
worker.onerror = (err) => reject(err.message);
});
return worker;
} finally {
URL.revokeObjectURL(url);
}
}

promise_test(async t => {
Expand Down

0 comments on commit 81a31b7

Please sign in to comment.