Changeset 290658 in webkit
- Timestamp:
- Mar 1, 2022, 10:34:58 AM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
fast/mediastream/getUserMedia-to-canvas-1.html (modified) (1 diff)
-
fast/mediastream/getUserMedia-to-canvas-2.html (modified) (1 diff)
-
fast/mediastream/resources/getUserMedia-to-canvas.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r290648 r290658 1 2022-03-01 Youenn Fablet <youenn@apple.com> 2 3 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 4 https://bugs.webkit.org/show_bug.cgi?id=237042 5 <rdar://problem/89298601> 6 7 Reviewed by Eric Carlson. 8 9 Video element videoWidth/videoHeight are updated when track settings are changed, 10 and not when video frames being received. 11 12 This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync 13 with the actual video frames (background thread) when there is a change of size. 14 15 We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames. 16 In the meantime, we update the test to set the orientation before creating the source. 17 This makes sure the video frames have the expected size and rotation. 18 19 * fast/mediastream/getUserMedia-to-canvas-1.html: 20 * fast/mediastream/getUserMedia-to-canvas-2.html: 21 * fast/mediastream/resources/getUserMedia-to-canvas.js: 22 1 23 2022-03-01 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-1.html
r290354 r290658 1 <!doctype html> <!-- webkit-test-runner [ WebRTCRemoteVideoFrameEnabled=false ] -->1 <!doctype html> 2 2 <html> 3 3 <head> -
trunk/LayoutTests/fast/mediastream/getUserMedia-to-canvas-2.html
r290354 r290658 1 <!doctype html> <!-- webkit-test-runner [ WebRTCRemoteVideoFrameEnabled=false ] -->1 <!doctype html> 2 2 <html> 3 3 <head> -
trunk/LayoutTests/fast/mediastream/resources/getUserMedia-to-canvas.js
r288315 r290658 11 11 video.srcObject = await navigator.mediaDevices.getUserMedia({ video: { width: { exact: width } } }); 12 12 await video.play(); 13 assert_ equals(video.videoWidth,width);13 assert_true(video.videoWidth === width || video.videoHeight === width); 14 14 return video; 15 15 } … … 128 128 async function testUserMediaToCanvas(t, subcase) { 129 129 const desc = testDescription(subcase); 130 const [angle] = setMockCameraImageOrientation(subcase.angle); 130 131 const video = await createSourceVideo(); 131 132 const debuge = document.getElementById("debuge"); 132 133 debuge.append(video); 133 const realVideoSize = [video.videoWidth, video.videoHeight];134 const videoSize = [video.videoWidth, video.videoHeight]; 134 135 t.add_cleanup(async () => { 135 // Reset orientation for the next test by going to 0.136 if (subcase.angle == 180) {137 // 180 -> 0 cannot detect rotation via video size change. Go via 90.138 const [angle, videoSize] = setMockCameraImageOrientation(90, realVideoSize);139 await waitForVideoSize(video, videoSize[0], videoSize[1]);140 }141 136 setMockCameraImageOrientation(0); 142 await waitForVideoSize(video, realVideoSize[0], realVideoSize[1]);143 137 debuge.removeChild(video); 144 138 }); 145 146 if (subcase.angle == 180) {147 // 0 -> 180 cannot detect rotation via video size change. Go via 90.148 const [angle, videoSize] = setMockCameraImageOrientation(90, realVideoSize);149 await waitForVideoSize(video, videoSize[0], videoSize[1]);150 }151 const [angle, videoSize] = setMockCameraImageOrientation(subcase.angle, realVideoSize);152 await waitForVideoSize(video, videoSize[0], videoSize[1]);153 139 154 140 const canvas = createVerifyCanvas(video);
Note:
See TracChangeset
for help on using the changeset viewer.