From 587cc1da69c7a9a7c9a7e95288cb08c501afb9dd Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 22 Oct 2024 21:45:36 +0000 Subject: [PATCH] Bug 1924455 [wpt PR 48591] - [wpt] Fail `VideoTrackGenerator-with-window-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 Reviewed-by: Harald Alvestrand Commit-Queue: Jonathan Lee Cr-Commit-Position: refs/heads/main{#1368294} -- wpt-commits: 302e6e04c6c54bf3891e6a6a15a2e04e3f72bb52 wpt-pr: 48591 UltraBlame original commit: 378f7e6ed8f4dcc66625b9b97b785562ec614a6a --- ...deoTrackGenerator-with-window-tracks.https.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/testing/web-platform/tests/mediacapture-insertable-streams/VideoTrackGenerator-with-window-tracks.https.html b/testing/web-platform/tests/mediacapture-insertable-streams/VideoTrackGenerator-with-window-tracks.https.html index 36fc4135e2344..dfe000fbddb6c 100644 --- a/testing/web-platform/tests/mediacapture-insertable-streams/VideoTrackGenerator-with-window-tracks.https.html +++ b/testing/web-platform/tests/mediacapture-insertable-streams/VideoTrackGenerator-with-window-tracks.https.html @@ -64,11 +64,15 @@

Description

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 => {