diff options
author | Basilisk-Dev <basiliskdev@protonmail.com> | 2023-10-09 17:08:07 -0400 |
---|---|---|
committer | Basilisk-Dev <basiliskdev@protonmail.com> | 2023-10-09 17:08:07 -0400 |
commit | 38dfadad45fe43d08de05706dc3332f41e94aee5 (patch) | |
tree | 988daccfdcd072cebf57b0e0cf00d0ad37747074 | |
parent | 9bee3a8b7250fe33f50eca53737f8bec71d69d84 (diff) | |
download | uxp-38dfadad45fe43d08de05706dc3332f41e94aee5.tar.gz |
Issue #2332 - Update most tests to skip RTCIceCandidate construction
Backport of https://bugzilla.mozilla.org/show_bug.cgi?id=1263312 part 5
4 files changed, 12 insertions, 12 deletions
diff --git a/dom/media/tests/mochitest/templates.js b/dom/media/tests/mochitest/templates.js index 3a8e0dd496..7a149c146e 100644 --- a/dom/media/tests/mochitest/templates.js +++ b/dom/media/tests/mochitest/templates.js @@ -118,7 +118,7 @@ var commandsPeerConnectionInitial = [ test.setupSignalingClient(); test.registerSignalingCallback("ice_candidate", function (message) { var pc = test.pcRemote ? test.pcRemote : test.pcLocal; - pc.storeOrAddIceCandidate(new RTCIceCandidate(message.ice_candidate)); + pc.storeOrAddIceCandidate(message.ice_candidate); }); test.registerSignalingCallback("end_of_trickle_ice", function (message) { test.signalingMessagesFinished(); diff --git a/dom/media/tests/mochitest/test_peerConnection_addIceCandidate.html b/dom/media/tests/mochitest/test_peerConnection_addIceCandidate.html index a46af2d2f0..ba0039a513 100644 --- a/dom/media/tests/mochitest/test_peerConnection_addIceCandidate.html +++ b/dom/media/tests/mochitest/test_peerConnection_addIceCandidate.html @@ -19,9 +19,9 @@ test.chain.insertAfter("PC_LOCAL_SET_LOCAL_DESCRIPTION", [ function PC_LOCAL_ADD_CANDIDATE_EARLY(test) { - var candidate = new RTCIceCandidate( - {candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host", - sdpMLineIndex: 0}); + var candidate = { + candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host", + sdpMLineIndex: 0}; return test.pcLocal._pc.addIceCandidate(candidate).then( generateErrorCallback("addIceCandidate should have failed."), err => { @@ -66,9 +66,9 @@ ); }, function PC_REMOTE_ADD_VALID_CANDIDATE(test) { - var candidate = new RTCIceCandidate( - {candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host", - sdpMLineIndex: 0}); + var candidate = { + candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host", + sdpMLineIndex: 0}; return test.pcRemote._pc.addIceCandidate(candidate) .then(() => ok(true, "Successfully added valid ICE candidate")); }, @@ -90,7 +90,7 @@ .then(() => ok(true, "Successfully added valid ICE candidate")); }, function PC_REMOTE_ADD_MATCHING_MID_AND_LEVEL_CANDIDATE(test) { - var candidate = new mozRTCIceCandidate( + var candidate = new RTCIceCandidate( {candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host", sdpMLineIndex: 0, sdpMid: "sdparta_0"}); diff --git a/dom/media/tests/mochitest/test_peerConnection_closeDuringIce.html b/dom/media/tests/mochitest/test_peerConnection_closeDuringIce.html index eb8228d03c..37b2011664 100644 --- a/dom/media/tests/mochitest/test_peerConnection_closeDuringIce.html +++ b/dom/media/tests/mochitest/test_peerConnection_closeDuringIce.html @@ -21,12 +21,12 @@ function PC_REMOTE_SETUP_NULL_ICE_HANDLER(test) { test.pcRemote.setupIceCandidateHandler(test, function() {}, function () {}); } function PC_REMOTE_ADD_FAKE_ICE_CANDIDATE(test) { - var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0}); + var cand = {"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0}; test.pcRemote.storeOrAddIceCandidate(cand); info(test.pcRemote + " Stored fake candidate: " + JSON.stringify(cand)); } function PC_LOCAL_ADD_FAKE_ICE_CANDIDATE(test) { - var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0}); + var cand = {"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0}; test.pcLocal.storeOrAddIceCandidate(cand); info(test.pcLocal + " Stored fake candidate: " + JSON.stringify(cand)); } diff --git a/dom/media/tests/mochitest/test_peerConnection_iceFailure.html b/dom/media/tests/mochitest/test_peerConnection_iceFailure.html index cbdfd018a0..3f6728573f 100644 --- a/dom/media/tests/mochitest/test_peerConnection_iceFailure.html +++ b/dom/media/tests/mochitest/test_peerConnection_iceFailure.html @@ -20,12 +20,12 @@ function PC_REMOTE_SETUP_NULL_ICE_HANDLER(test) { test.pcRemote.setupIceCandidateHandler(test, function() {}, function () {}); } function PC_REMOTE_ADD_FAKE_ICE_CANDIDATE(test) { - var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0}); + var cand = {"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0}; test.pcRemote.storeOrAddIceCandidate(cand); info(test.pcRemote + " Stored fake candidate: " + JSON.stringify(cand)); } function PC_LOCAL_ADD_FAKE_ICE_CANDIDATE(test) { - var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0}); + var cand = {"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0}; test.pcLocal.storeOrAddIceCandidate(cand); info(test.pcLocal + " Stored fake candidate: " + JSON.stringify(cand)); } |