Title: [293581] trunk/LayoutTests
Revision
293581
Author
[email protected]
Date
2022-04-28 12:05:11 -0700 (Thu, 28 Apr 2022)

Log Message

Update webrtc/connection-state.html to not expected the completed ice connection state
https://bugs.webkit.org/show_bug.cgi?id=239843

Reviewed by Eric Carlson.

Wait for video to be playable to check states.
Remove completed state from the expected ice connection state as this is racy and app specific for when completed will happen (it can take a long time or not).
This is aligned with WebKit and Chrome implementations.

* TestExpectations:
* webrtc/connection-state.html:
* webrtc/connection-state-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (293580 => 293581)


--- trunk/LayoutTests/ChangeLog	2022-04-28 18:45:13 UTC (rev 293580)
+++ trunk/LayoutTests/ChangeLog	2022-04-28 19:05:11 UTC (rev 293581)
@@ -1,3 +1,18 @@
+2022-04-28  Youenn Fablet  <[email protected]>
+
+        Update webrtc/connection-state.html to not expected the completed ice connection state
+        https://bugs.webkit.org/show_bug.cgi?id=239843
+
+        Reviewed by Eric Carlson.
+
+        Wait for video to be playable to check states.
+        Remove completed state from the expected ice connection state as this is racy and app specific for when completed will happen (it can take a long time or not).
+        This is aligned with WebKit and Chrome implementations.
+
+        * TestExpectations:
+        * webrtc/connection-state.html:
+        * webrtc/connection-state-expected.txt:
+
 2022-04-28  Yusuke Suzuki  <[email protected]>
 
         [WTF] Use quadratic-probing instead of double-hashing

Modified: trunk/LayoutTests/TestExpectations (293580 => 293581)


--- trunk/LayoutTests/TestExpectations	2022-04-28 18:45:13 UTC (rev 293580)
+++ trunk/LayoutTests/TestExpectations	2022-04-28 19:05:11 UTC (rev 293581)
@@ -2126,8 +2126,6 @@
 webrtc/h264-baseline.html [ Slow ]
 webrtc/h264-high.html [ Slow ]
 
-webkit.org/b/207798 webrtc/connection-state.html [ Pass Failure ]
-
 imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html [ Slow ]
 imported/w3c/web-platform-tests/webrtc/protocol/split.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-relay-canvas.https.html [ Failure ]

Modified: trunk/LayoutTests/webrtc/connection-state-expected.txt (293580 => 293581)


--- trunk/LayoutTests/webrtc/connection-state-expected.txt	2022-04-28 18:45:13 UTC (rev 293580)
+++ trunk/LayoutTests/webrtc/connection-state-expected.txt	2022-04-28 19:05:11 UTC (rev 293581)
@@ -1,4 +1,5 @@
 
+
 PASS Checking various connection state for video exchange
 PASS Checking connection state event when closing peer connetion
 

Modified: trunk/LayoutTests/webrtc/connection-state.html (293580 => 293581)


--- trunk/LayoutTests/webrtc/connection-state.html	2022-04-28 18:45:13 UTC (rev 293580)
+++ trunk/LayoutTests/webrtc/connection-state.html	2022-04-28 19:05:11 UTC (rev 293581)
@@ -7,6 +7,7 @@
         <script src=""
     </head>
     <body>
+        <video id="video" muted playsinline></video>
         <script src =""
         <script>
 promise_test((test) => {
@@ -33,7 +34,8 @@
                     localGatheringStates.push(firstConnection.iceGatheringState);
                 }
                 firstConnection._oniceconnectionstatechange_ = () => {
-                    localIceConnectionStates.push(firstConnection.iceConnectionState);
+                    if (firstConnection.iceConnectionState !== 'completed')
+                        localIceConnectionStates.push(firstConnection.iceConnectionState);
                 }
             }, (connection) => {
                 secondConnection = connection;
@@ -45,7 +47,8 @@
                     remoteGatheringStates.push(secondConnection.iceGatheringState);
                 }
                 secondConnection._oniceconnectionstatechange_ = () => {
-                    remoteIceConnectionStates.push(secondConnection.iceConnectionState);
+                    if (secondConnection.iceConnectionState !== 'completed')
+                        remoteIceConnectionStates.push(secondConnection.iceConnectionState);
                 }
                 secondConnection._ontrack_ = (trackEvent) => {
                     resolve(trackEvent.streams[0]);
@@ -54,13 +57,14 @@
             setTimeout(() => reject("Test timed out"), 5000);
         });
     }).then((stream) => {
-        return waitFor(500);
+        video.srcObject = stream;
+        return video.play();
     }).then(() => {
         assert_array_equals(localConnectionStates, ["new", "connecting", "connected"]);
         assert_array_equals(remoteConnectionStates, ["new", "connecting", "connected"]);
         assert_array_equals(localGatheringStates, ["new", "gathering", "complete"]);
         assert_array_equals(remoteGatheringStates, ["new", "gathering", "complete"]);
-        assert_array_equals(localIceConnectionStates, ["new", "checking", "connected", "completed"]);
+        assert_array_equals(localIceConnectionStates, ["new", "checking", "connected"]);
         assert_array_equals(remoteIceConnectionStates, ["new", "checking", "connected"]);
     });
 }, "Checking various connection state for video exchange");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to