Skip to content

Commit

Permalink
REGRESSION(272844@main): [ wk2 ] imported/w3c/web-platform-tests/webr…
Browse files Browse the repository at this point in the history
…tc/RTCPeerConnection-GC.https.html is consistently failing.

https://bugs.webkit.org/show_bug.cgi?id=267355
rdar://120798707

Reviewed by Eric Carlson.

The previous try to fix the flakiness was not taking into account the case of resize event firing to handle the transition from (0,0) to (160,160).
If it fires while onVideoChange is running, onVideoChange would spin as resizeEvent promise would not be recomputed and stay resolved.

We simply remove the resize event check and only rely on the setTimeout check which has the same frequency as the video frame emition by the canvas.

* LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-GC.https.html:
* LayoutTests/platform/wk2/TestExpectations:

Canonical link: https://commits.webkit.org/272990@main
  • Loading branch information
youennf committed Jan 12, 2024
1 parent da189d1 commit 87194ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@
const start = performance.now();
const width = destVideo.videoWidth;
const height = destVideo.videoHeight;
const resizeEvent = new Promise(r => destVideo.onresize = r);
while (destVideo.videoWidth == width && destVideo.videoHeight == height) {
if (performance.now() - start > 5000) {
throw new Error("Timeout waiting for video size change");
}
await Promise.race([
resizeEvent,
new Promise(r => setTimeout(r, 50)),
]);
await new Promise(r => t.step_timeout(r, 50));
}
};

Expand Down
2 changes: 0 additions & 2 deletions LayoutTests/platform/wk2/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -884,5 +884,3 @@ webkit.org/b/262157 imported/w3c/web-platform-tests/css/css-contain/content-visi
webkit.org/b/261314 [ Debug ] fast/mediastream/captureStream/canvas3d.html [ Pass Failure ]

webkit.org/b/265700 webrtc/multi-video.html [ Pass Failure ]

webkit.org/b/267355 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-GC.https.html [ Pass Failure ]

0 comments on commit 87194ae

Please sign in to comment.