webrtc wpt: add addIceCandidate(new RTCIceCandidate({candidate, sdpMid})) test

which should have caught the bug

BUG=965483

Change-Id: I379f14ee625a9f43889d778b9774bb04949c73af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628722
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#663512}
diff --git a/webrtc/RTCPeerConnection-addIceCandidate.html b/webrtc/RTCPeerConnection-addIceCandidate.html
index c51c11f..ed52ace 100644
--- a/webrtc/RTCPeerConnection-addIceCandidate.html
+++ b/webrtc/RTCPeerConnection-addIceCandidate.html
@@ -269,6 +269,17 @@
     t.add_cleanup(() => pc.close());
 
     return pc.setRemoteDescription(sessionDesc)
+      .then(() => pc.addIceCandidate(new RTCIceCandidate({
+        candidate: candidateStr1,
+        sdpMid: sdpMid1 })));
+  }, 'Add candidate with only valid sdpMid and RTCIceCandidate should succeed');
+
+  promise_test(t => {
+    const pc = new RTCPeerConnection();
+
+    t.add_cleanup(() => pc.close());
+
+    return pc.setRemoteDescription(sessionDesc)
       .then(() => pc.addIceCandidate({
         candidate: candidateStr1,
         sdpMLineIndex: sdpMLineIndex1 }));