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 4fe8c20c460c..da5eec21e991 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 @@ -573,29 +573,50 @@ url ) ; +try +{ await new Promise ( +( resolve +reject +) = > +{ worker . onmessage = +resolve +; +worker +. +onerror += ( +err ) = > -{ -resolve +reject ( +err +. +message ) ; } ) ; +return +worker +; +} +finally +{ URL . revokeObjectURL @@ -603,9 +624,7 @@ url ) ; -return -worker -; +} } promise_test (