Title: [214493] trunk/LayoutTests
Revision
214493
Author
[email protected]
Date
2017-03-28 14:17:12 -0700 (Tue, 28 Mar 2017)

Log Message

Update LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html to get more coverage
https://bugs.webkit.org/show_bug.cgi?id=170194

Patch by Youenn Fablet <[email protected]> on 2017-03-28
Reviewed by Chris Dumez.

* fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-addIceCandidate.html: Making test more robust to failures to get more coverage.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (214492 => 214493)


--- trunk/LayoutTests/ChangeLog	2017-03-28 20:57:11 UTC (rev 214492)
+++ trunk/LayoutTests/ChangeLog	2017-03-28 21:17:12 UTC (rev 214493)
@@ -1,3 +1,13 @@
+2017-03-28  Youenn Fablet  <[email protected]>
+
+        Update LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html to get more coverage
+        https://bugs.webkit.org/show_bug.cgi?id=170194
+
+        Reviewed by Chris Dumez.
+
+        * fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
+        * fast/mediastream/RTCPeerConnection-addIceCandidate.html: Making test more robust to failures to get more coverage.
+
 2017-03-28  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Inspecting a Main Resource that is JS/JSON does not format / syntax highlight it properly

Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt (214492 => 214493)


--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt	2017-03-28 20:57:11 UTC (rev 214492)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt	2017-03-28 21:17:12 UTC (rev 214493)
@@ -11,7 +11,23 @@
 
 *** Define sdpMid, badSdpMid, sdpMLineIndex and badSdpMLineIndex for testing
 PASS sdpMLineIndex is not badSdpMLineIndex
-FAIL Error in promise chain: TypeError: undefined is not an object (evaluating 'pc.getTransceivers()[0].mid')
+FAIL sdpMid should not be null.
+PASS sdpMid is not badSdpMid
+FAIL promise pc.addIceCandidate(new RTCIceCandidate({candidate: validCandidate, sdpMid: badSdpMid})) fulfilled unexpectedly.
+FAIL promise pc.addIceCandidate(new RTCIceCandidate({candidate: validCandidate, sdpMLineIndex: badSdpMLineIndex})) fulfilled unexpectedly.
+*** A (bad) sdpMid takes precedesce over valid sdpMLineIndex
+FAIL promise pc.addIceCandidate(new RTCIceCandidate({candidate: validCandidate, sdpMid: badSdpMid, sdpMLineIndex: sdpMLineIndex})) fulfilled unexpectedly.
+*** Test bad candidate content with valid sdpMid
+FAIL evaluating pc.addIceCandidate(new RTCIceCandidate({candidate: 'bad content', sdpMid: sdpMid})) threw exception TypeError: Type error
+*** Test bad candidate content with valid sdpMLineIndex
+PASS promise pc.addIceCandidate(new RTCIceCandidate({candidate: 'bad content', sdpMLineIndex: sdpMLineIndex})) rejected with OperationError (DOM Exception 34): Expect line: candidate:<candidate-str>
+
+*** Test some OK input
+FAIL promise pc.addIceCandidate({candidate: validCandidate, sdpMid: sdpMid}) rejected unexpectedly.
+PASS promise pc.addIceCandidate(new RTCIceCandidate({candidate: validCandidate, sdpMLineIndex: sdpMLineIndex})) fulfilled with undefined
+*** A valid sdpMid takes precedesce over a bad sdpMLineIndex
+PASS promise pc.addIceCandidate(new RTCIceCandidate({candidate: validCandidate, sdpMid: sdpMid, sdpMLineIndex: badSdpMLineIndex})) fulfilled with undefined
+PASS End of test promise chain
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html (214492 => 214493)


--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html	2017-03-28 20:57:11 UTC (rev 214492)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html	2017-03-28 21:17:12 UTC (rev 214493)
@@ -50,7 +50,7 @@
                 badSdpMLineIndex = sdpMLineIndex + pc.getTransceivers().length + 10;
                 shouldNotBe("sdpMLineIndex", "badSdpMLineIndex");
 
-                sdpMid = pc.getTransceivers()[0].mid;
+                sdpMid = pc.getTransceivers()[0] ? pc.getTransceivers()[0].mid : null;
                 shouldNotBe("sdpMid", "null");
                 badSdpMid = sdpMid + "_foo";
                 shouldNotBe("sdpMid", "badSdpMid");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to