Title: [290658] trunk/LayoutTests
- Revision
- 290658
- Author
- you...@apple.com
- Date
- 2022-03-01 10:34:58 -0800 (Tue, 01 Mar 2022)
Log Message
fast/mediastream/getUserMedia-to-canvas-1.html and fast/mediastream/getUserMedia-to-canvas-2.html are failing on MacOS when remote video frame flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=237042
<rdar://problem/89298601>
Reviewed by Eric Carlson.
Video element videoWidth/videoHeight are updated when track settings are changed,
and not when video frames being received.
This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync
with the actual video frames (background thread) when there is a change of size.
We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames.
In the meantime, we update the test to set the orientation before creating the source.
This makes sure the video frames have the expected size and rotation.
* fast/mediastream/getUserMedia-to-canvas-1.html:
* fast/mediastream/getUserMedia-to-canvas-2.html:
* fast/mediastream/resources/getUserMedia-to-canvas.js:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (290657 => 290658)
--- trunk/LayoutTests/ChangeLog 2022-03-01 18:34:34 UTC (rev 290657)
+++ trunk/LayoutTests/ChangeLog 2022-03-01 18:34:58 UTC (rev 290658)
@@ -1,3 +1,25 @@
+2022-03-01 Youenn Fablet <you...@apple.com>
+
+ fast/mediastream/getUserMedia-to-canvas-1.html and fast/mediastream/getUserMedia-to-canvas-2.html are failing on MacOS when remote video frame flag is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=237042
+ <rdar://problem/89298601>
+
+ Reviewed by Eric Carlson.
+
+ Video element videoWidth/videoHeight are updated when track settings are changed,
+ and not when video frames being received.
+
+ This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync
+ with the actual video frames (background thread) when there is a change of size.
+
+ We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames.
+ In the meantime, we update the test to set the orientation before creating the source.
+ This makes sure the video frames have the expected size and rotation.
+
+ * fast/mediastream/getUserMedia-to-canvas-1.html:
+ * fast/mediastream/getUserMedia-to-canvas-2.html:
+ * fast/mediastream/resources/getUserMedia-to-canvas.js:
+
2022-03-01 Chris Dumez <cdu...@apple.com>
[Debug] imported/w3c/web-platform-tests/url/toascii.window.html is crashing
Modified: trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-1.html (290657 => 290658)
--- trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-1.html 2022-03-01 18:34:34 UTC (rev 290657)
+++ trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-1.html 2022-03-01 18:34:58 UTC (rev 290658)
@@ -1,4 +1,4 @@
-<!doctype html><!-- webkit-test-runner [ WebRTCRemoteVideoFrameEnabled=false ] -->
+<!doctype html>
<html>
<head>
<meta name="timeout" content="long">
Modified: trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-2.html (290657 => 290658)
--- trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-2.html 2022-03-01 18:34:34 UTC (rev 290657)
+++ trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-2.html 2022-03-01 18:34:58 UTC (rev 290658)
@@ -1,4 +1,4 @@
-<!doctype html><!-- webkit-test-runner [ WebRTCRemoteVideoFrameEnabled=false ] -->
+<!doctype html>
<html>
<head>
<meta name="timeout" content="long">
Modified: trunk/LayoutTests/fast/mediastream/resources/getUserMedia-to-canvas.js (290657 => 290658)
--- trunk/LayoutTests/fast/mediastream/resources/getUserMedia-to-canvas.js 2022-03-01 18:34:34 UTC (rev 290657)
+++ trunk/LayoutTests/fast/mediastream/resources/getUserMedia-to-canvas.js 2022-03-01 18:34:58 UTC (rev 290658)
@@ -10,7 +10,7 @@
const video = document.createElement("video");
video.srcObject = await navigator.mediaDevices.getUserMedia({ video: { width: { exact: width } } });
await video.play();
- assert_equals(video.videoWidth, width);
+ assert_true(video.videoWidth === width || video.videoHeight === width);
return video;
}
@@ -127,30 +127,16 @@
async function testUserMediaToCanvas(t, subcase) {
const desc = testDescription(subcase);
+ const [angle] = setMockCameraImageOrientation(subcase.angle);
const video = await createSourceVideo();
const debuge = document.getElementById("debuge");
debuge.append(video);
- const realVideoSize = [video.videoWidth, video.videoHeight];
+ const videoSize = [video.videoWidth, video.videoHeight];
t.add_cleanup(async () => {
- // Reset orientation for the next test by going to 0.
- if (subcase.angle == 180) {
- // 180 -> 0 cannot detect rotation via video size change. Go via 90.
- const [angle, videoSize] = setMockCameraImageOrientation(90, realVideoSize);
- await waitForVideoSize(video, videoSize[0], videoSize[1]);
- }
setMockCameraImageOrientation(0);
- await waitForVideoSize(video, realVideoSize[0], realVideoSize[1]);
debuge.removeChild(video);
});
- if (subcase.angle == 180) {
- // 0 -> 180 cannot detect rotation via video size change. Go via 90.
- const [angle, videoSize] = setMockCameraImageOrientation(90, realVideoSize);
- await waitForVideoSize(video, videoSize[0], videoSize[1]);
- }
- const [angle, videoSize] = setMockCameraImageOrientation(subcase.angle, realVideoSize);
- await waitForVideoSize(video, videoSize[0], videoSize[1]);
-
const canvas = createVerifyCanvas(video);
debuge.appendChild(canvas);
t.add_cleanup(async () => debuge.removeChild(canvas));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes