Diff
Modified: trunk/LayoutTests/ChangeLog (271300 => 271301)
--- trunk/LayoutTests/ChangeLog 2021-01-08 17:02:41 UTC (rev 271300)
+++ trunk/LayoutTests/ChangeLog 2021-01-08 17:03:02 UTC (rev 271301)
@@ -1,5 +1,29 @@
2021-01-08 Youenn Fablet <[email protected]>
+ Fix count failure check in LayoutTests/webrtc/h264-high.html
+ https://bugs.webkit.org/show_bug.cgi?id=220234
+ <rdar://problem/72791771>
+
+ Reviewed by Eric Carlson.
+
+ Frame size error check should check for count being 50 instead of 20.
+ Update code to use a max variable instead.
+ Move common code between the two tests in webrtc/h264-profile-tests.js.
+ Add ios specific expectations since high resolutions do not seem to be supported there.
+
+ * platform/ios/webrtc/h264-baseline-expected.txt: Added.
+ * platform/ios/webrtc/h264-high-expected.txt: Added.
+ * platform/mac-wk2/TestExpectations:
+ * webrtc/h264-baseline.html:
+ * webrtc/h264-high.html:
+ * webrtc/h264-profile-tests.js: Added.
+ (async waitForVideoSize):
+ (testProfile):
+ (async testResolutions.async resolutions):
+ (async testResolutions):
+
+2021-01-08 Youenn Fablet <[email protected]>
+
PaintFrameForMedia has a null identifier when media player is a media stream track video player
https://bugs.webkit.org/show_bug.cgi?id=220411
Added: trunk/LayoutTests/platform/ios/webrtc/h264-baseline-expected.txt (0 => 271301)
--- trunk/LayoutTests/platform/ios/webrtc/h264-baseline-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/webrtc/h264-baseline-expected.txt 2021-01-08 17:03:02 UTC (rev 271301)
@@ -0,0 +1,22 @@
+
+
+PASS Baseline video exchange
+PASS Video resolution test: 320 240
+PASS Video resolution test: 640 480
+PASS Video resolution test: 1024 768
+FAIL Video resolution test: 1280 960 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+FAIL Video resolution test: 1600 1200 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+PASS Video resolution test: 320 180
+PASS Video resolution test: 640 360
+PASS Video resolution test: 1280 720
+FAIL Video resolution test: 1920 1080 promise_test: Unhandled rejection with value: "Video size not expected : 1280 720"
+PASS Video resolution test with maxBitrate: 320 240
+PASS Video resolution test with maxBitrate: 640 480
+PASS Video resolution test with maxBitrate: 1024 768
+FAIL Video resolution test with maxBitrate: 1280 960 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+FAIL Video resolution test with maxBitrate: 1600 1200 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+PASS Video resolution test with maxBitrate: 320 180
+PASS Video resolution test with maxBitrate: 640 360
+PASS Video resolution test with maxBitrate: 1280 720
+FAIL Video resolution test with maxBitrate: 1920 1080 promise_test: Unhandled rejection with value: "Video size not expected : 1280 720"
+
Added: trunk/LayoutTests/platform/ios/webrtc/h264-high-expected.txt (0 => 271301)
--- trunk/LayoutTests/platform/ios/webrtc/h264-high-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/webrtc/h264-high-expected.txt 2021-01-08 17:03:02 UTC (rev 271301)
@@ -0,0 +1,22 @@
+
+
+PASS High video exchange
+PASS Video resolution test: 320 240
+PASS Video resolution test: 640 480
+PASS Video resolution test: 1024 768
+FAIL Video resolution test: 1280 960 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+FAIL Video resolution test: 1600 1200 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+PASS Video resolution test: 320 180
+PASS Video resolution test: 640 360
+PASS Video resolution test: 1280 720
+FAIL Video resolution test: 1920 1080 promise_test: Unhandled rejection with value: "Video size not expected : 1280 720"
+PASS Video resolution test with maxBitrate: 320 240
+PASS Video resolution test with maxBitrate: 640 480
+PASS Video resolution test with maxBitrate: 1024 768
+FAIL Video resolution test with maxBitrate: 1280 960 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+FAIL Video resolution test with maxBitrate: 1600 1200 promise_test: Unhandled rejection with value: "Video size not expected : 1024 768"
+PASS Video resolution test with maxBitrate: 320 180
+PASS Video resolution test with maxBitrate: 640 360
+PASS Video resolution test with maxBitrate: 1280 720
+FAIL Video resolution test with maxBitrate: 1920 1080 promise_test: Unhandled rejection with value: "Video size not expected : 1280 720"
+
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (271300 => 271301)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-01-08 17:02:41 UTC (rev 271300)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-01-08 17:03:02 UTC (rev 271301)
@@ -1248,8 +1248,7 @@
#<rdar://68952824> [ macOS iOS wk2 ] media/media-continues-playing-after-replace-source.html is a flaky failure
[ BigSur+ ] media/media-continues-playing-after-replace-source.html [ Pass Failure ]
-#<rdar://68957215> [ BigSur+ ] webrtc/captureCanvas-webrtc-software-h264-high.html is a constant failure/timeout
-[ BigSur+ ] webrtc/captureCanvas-webrtc-software-h264-high.html [ Failure Timeout ]
+[ BigSur+ ] webrtc/captureCanvas-webrtc-software-h264-high.html [ Failure ]
webkit.org/b/216634 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html [ Pass Failure ]
Modified: trunk/LayoutTests/webrtc/h264-baseline.html (271300 => 271301)
--- trunk/LayoutTests/webrtc/h264-baseline.html 2021-01-08 17:02:41 UTC (rev 271300)
+++ trunk/LayoutTests/webrtc/h264-baseline.html 2021-01-08 17:03:02 UTC (rev 271301)
@@ -8,7 +8,8 @@
</head>
<body>
<video id="video" autoplay=""></video>
- <script src =""
+ <script src=""
+ <script src=""
<script>
const resolutions = [
[320, 240],
@@ -23,59 +24,8 @@
[1920, 1080]
];
-async function waitForVideoSize(width, height)
-{
- let counter = 0;
- while (++counter < 50 && video.videoWidth != width && video.videoHeight != height)
- await waitFor(200);
-
- if (counter === 20)
- return Promise.reject("Video size not expected : " + video.videoWidth + " " + video.videoHeight);
-}
-
-let pc1, pc2;
-let localVideoTrack;
-promise_test(async (test) => {
- const localStream = await navigator.mediaDevices.getUserMedia({ video: true });
- localVideoTrack = localStream.getVideoTracks()[0];
- const stream = await new Promise((resolve, reject) => {
- createConnections((firstConnection) => {
- pc1 = firstConnection;
- firstConnection.addTrack(localVideoTrack, localStream);
- }, (secondConnection) => {
- pc2 = secondConnection;
- secondConnection._ontrack_ = (trackEvent) => {
- resolve(trackEvent.streams[0]);
- };
- }, { observeOffer : (offer) => {
- offer.sdp = setH264BaselineCodec(offer.sdp);
- return offer;
- }
- });
- setTimeout(() => reject("Test timed out"), 5000);
- });
-
- video.srcObject = stream;
- await video.play();
-}, "Baseline video exchange");
-
-resolutions.forEach(resolution => {
- promise_test(async (test) => {
- await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
- return waitForVideoSize(resolution[0], resolution[1]);
- }, "Video resolution test: " + resolution[0] + " " + resolution[1]);
-});
-
-resolutions.forEach(resolution => {
- promise_test(async (test) => {
- const parameters = pc1.getSenders()[0].getParameters();
- parameters.encodings[0].maxBitrate = 100000;
- pc1.getSenders()[0].setParameters(parameters);
-
- await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
- return waitForVideoSize(resolution[0], resolution[1]);
- }, "Video resolution test with maxBitrate: " + resolution[0] + " " + resolution[1]);
-});
+testProfile(setH264BaselineCodec, "Baseline video exchange");
+testResolutions(resolutions);
</script>
</body>
</html>
Modified: trunk/LayoutTests/webrtc/h264-high.html (271300 => 271301)
--- trunk/LayoutTests/webrtc/h264-high.html 2021-01-08 17:02:41 UTC (rev 271300)
+++ trunk/LayoutTests/webrtc/h264-high.html 2021-01-08 17:03:02 UTC (rev 271301)
@@ -9,6 +9,7 @@
<body>
<video id="video" autoplay=""></video>
<script src =""
+ <script src=""
<script>
const resolutions = [
[320, 240],
@@ -23,59 +24,8 @@
[1920, 1080]
];
-async function waitForVideoSize(width, height)
-{
- let counter = 0;
- while (++counter < 50 && video.videoWidth != width && video.videoHeight != height)
- await waitFor(200);
-
- if (counter === 20)
- return Promise.reject("Video size not expected : " + video.videoWidth + " " + video.videoHeight);
-}
-
-let pc1, pc2;
-let localVideoTrack;
-promise_test(async (test) => {
- const localStream = await navigator.mediaDevices.getUserMedia({ video: true });
- localVideoTrack = localStream.getVideoTracks()[0];
- const stream = await new Promise((resolve, reject) => {
- createConnections((firstConnection) => {
- pc1 = firstConnection;
- firstConnection.addTrack(localVideoTrack, localStream);
- }, (secondConnection) => {
- pc2 = secondConnection;
- secondConnection._ontrack_ = (trackEvent) => {
- resolve(trackEvent.streams[0]);
- };
- }, { observeOffer : (offer) => {
- offer.sdp = setH264HighCodec(offer.sdp);
- return offer;
- }
- });
- setTimeout(() => reject("Test timed out"), 5000);
- });
-
- video.srcObject = stream;
- await video.play();
-}, "High video exchange");
-
-resolutions.forEach(resolution => {
- promise_test(async (test) => {
- await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
- return waitForVideoSize(resolution[0], resolution[1]);
- }, "Video resolution test: " + resolution[0] + " " + resolution[1]);
-});
-
-resolutions.forEach(resolution => {
- promise_test(async (test) => {
- const parameters = pc1.getSenders()[0].getParameters();
- parameters.encodings[0].maxBitrate = 100000;
- pc1.getSenders()[0].setParameters(parameters);
-
- await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
- return waitForVideoSize(resolution[0], resolution[1]);
- }, "Video resolution test with maxBitrate: " + resolution[0] + " " + resolution[1]);
-});
+testProfile(setH264HighCodec, "High video exchange");
+testResolutions(resolutions);
</script>
</body>
</html>
Added: trunk/LayoutTests/webrtc/h264-profile-tests.js (0 => 271301)
--- trunk/LayoutTests/webrtc/h264-profile-tests.js (rev 0)
+++ trunk/LayoutTests/webrtc/h264-profile-tests.js 2021-01-08 17:03:02 UTC (rev 271301)
@@ -0,0 +1,61 @@
+async function waitForVideoSize(width, height)
+{
+ const max = 200
+ let counter = 0;
+ while (++counter < max && video.videoWidth != width && video.videoHeight != height)
+ await waitFor(50);
+
+ if (counter === max)
+ return Promise.reject("Video size not expected : " + video.videoWidth + " " + video.videoHeight);
+}
+
+let pc1, pc2;
+let localVideoTrack;
+
+function testProfile(setProfileCallback, testName)
+{
+ promise_test(async (test) => {
+ const localStream = await navigator.mediaDevices.getUserMedia({ video: true });
+ localVideoTrack = localStream.getVideoTracks()[0];
+ const stream = await new Promise((resolve, reject) => {
+ createConnections((firstConnection) => {
+ pc1 = firstConnection;
+ firstConnection.addTrack(localVideoTrack, localStream);
+ }, (secondConnection) => {
+ pc2 = secondConnection;
+ secondConnection._ontrack_ = (trackEvent) => {
+ resolve(trackEvent.streams[0]);
+ };
+ }, { observeOffer : (offer) => {
+ offer.sdp = setProfileCallback(offer.sdp);
+ return offer;
+ }
+ });
+ setTimeout(() => reject("Test timed out"), 5000);
+ });
+
+ video.srcObject = stream;
+ await video.play();
+ }, testName);
+}
+
+function testResolutions(resolutions)
+{
+ resolutions.forEach(resolution => {
+ promise_test(async (test) => {
+ await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
+ return waitForVideoSize(resolution[0], resolution[1]);
+ }, "Video resolution test: " + resolution[0] + " " + resolution[1]);
+ });
+
+ resolutions.forEach(resolution => {
+ promise_test(async (test) => {
+ const parameters = pc1.getSenders()[0].getParameters();
+ parameters.encodings[0].maxBitrate = 100000;
+ pc1.getSenders()[0].setParameters(parameters);
+
+ await localVideoTrack.applyConstraints({ width : resolution[0], height : resolution[1] });
+ return waitForVideoSize(resolution[0], resolution[1]);
+ }, "Video resolution test with maxBitrate: " + resolution[0] + " " + resolution[1]);
+ });
+}