diff --git a/dom/media/tests/mochitest/identity/test_fingerprints.html b/dom/media/tests/mochitest/identity/test_fingerprints.html index 0fd065af26d9..bf26c2fdd5e6 100644 --- a/dom/media/tests/mochitest/identity/test_fingerprints.html +++ b/dom/media/tests/mochitest/identity/test_fingerprints.html @@ -86,8 +86,7 @@ function testMultipleFingerprints() { fingerprintSdp(fingerprints.slice(1)) + offer.sdp.slice(match.index); - var desc = new RTCSessionDescription({ type: 'offer', sdp: sdp }); - return pcStrict.setRemoteDescription(desc); + return pcStrict.setRemoteDescription({ type: 'offer', sdp }); }) .then(() => { ok(true, 'Modified fingerprints were accepted'); diff --git a/dom/media/tests/mochitest/pc.js b/dom/media/tests/mochitest/pc.js index 37e3b7e36f44..446152842a5a 100644 --- a/dom/media/tests/mochitest/pc.js +++ b/dom/media/tests/mochitest/pc.js @@ -334,7 +334,7 @@ PeerConnectionTest.prototype.createOffer = function(peer) { * * @param {PeerConnectionWrapper} peer The peer connection wrapper to run the command on - * @param {RTCSessionDescription} desc + * @param {RTCSessionDescriptionInit} desc * Session description for the local description request */ PeerConnectionTest.prototype.setLocalDescription = @@ -403,7 +403,7 @@ PeerConnectionTest.prototype.setOfferOptions = function(options) { * * @param {PeerConnectionWrapper} peer The peer connection wrapper to run the command on - * @param {RTCSessionDescription} desc + * @param {RTCSessionDescriptionInit} desc * Session description for the remote description request */ PeerConnectionTest.prototype.setRemoteDescription = @@ -1071,7 +1071,7 @@ PeerConnectionWrapper.prototype = { * Sets the local description and automatically handles the failure case. * * @param {object} desc - * RTCSessionDescription for the local description request + * RTCSessionDescriptionInit for the local description request */ setLocalDescription : function(desc) { this.observedNegotiationNeeded = undefined; @@ -1085,7 +1085,7 @@ PeerConnectionWrapper.prototype = { * causes the test case to fail if the call succeeds. * * @param {object} desc - * RTCSessionDescription for the local description request + * RTCSessionDescriptionInit for the local description request * @returns {Promise} * A promise that resolves to the expected error */ @@ -1102,7 +1102,7 @@ PeerConnectionWrapper.prototype = { * Sets the remote description and automatically handles the failure case. * * @param {object} desc - * RTCSessionDescription for the remote description request + * RTCSessionDescriptionInit for the remote description request */ setRemoteDescription : function(desc) { this.observedNegotiationNeeded = undefined; @@ -1122,7 +1122,7 @@ PeerConnectionWrapper.prototype = { * causes the test case to fail if the call succeeds. * * @param {object} desc - * RTCSessionDescription for the remote description request + * RTCSessionDescriptionInit for the remote description request * @returns {Promise} * a promise that resolve to the returned error */ diff --git a/dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html b/dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html index 6d152a4fa6b5..9ae3b8d50f86 100644 --- a/dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html +++ b/dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html @@ -27,8 +27,7 @@ function testSetLocalDescriptionError() { var pc = new RTCPeerConnection(); info ("Testing setLocalDescription error"); - return pc.setLocalDescription(new RTCSessionDescription({ sdp: "Picklechips!", - type: "offer" })) + return pc.setLocalDescription({ sdp: "Picklechips!", type: "offer" }) .then(generateErrorCallback("setLocalDescription with nonsense SDP should fail"), validateReason); }; @@ -36,8 +35,7 @@ function testSetRemoteDescriptionError() { var pc = new RTCPeerConnection(); info ("Testing setRemoteDescription error"); - return pc.setRemoteDescription(new RTCSessionDescription({ sdp: "Who?", - type: "offer" })) + return pc.setRemoteDescription({ sdp: "Who?", type: "offer" }) .then(generateErrorCallback("setRemoteDescription with nonsense SDP should fail"), validateReason); }; diff --git a/dom/media/tests/mochitest/test_peerConnection_localReofferRollback.html b/dom/media/tests/mochitest/test_peerConnection_localReofferRollback.html index 0b0b35fe80b6..ed149747cab5 100644 --- a/dom/media/tests/mochitest/test_peerConnection_localReofferRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_localReofferRollback.html @@ -37,10 +37,9 @@ }, function PC_REMOTE_ROLLBACK(test) { - return test.setLocalDescription( - test.pcRemote, - new RTCSessionDescription({ type: "rollback", sdp: ""}), - STABLE); + return test.setLocalDescription(test.pcRemote, + { type: "rollback", sdp: "" }, + STABLE); }, // Rolling back should shut down gathering diff --git a/dom/media/tests/mochitest/test_peerConnection_localRollback.html b/dom/media/tests/mochitest/test_peerConnection_localRollback.html index 2a35920baa6d..45ceba844e6f 100644 --- a/dom/media/tests/mochitest/test_peerConnection_localRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_localRollback.html @@ -23,10 +23,9 @@ }, function PC_REMOTE_ROLLBACK(test) { - return test.setLocalDescription( - test.pcRemote, - new RTCSessionDescription({ type: "rollback", sdp: ""}), - STABLE); + return test.setLocalDescription(test.pcRemote, + { type: "rollback", sdp: "" }, + STABLE); }, // Rolling back should shut down gathering diff --git a/dom/media/tests/mochitest/test_peerConnection_remoteReofferRollback.html b/dom/media/tests/mochitest/test_peerConnection_remoteReofferRollback.html index 6b518e1d29d6..7580358b86b7 100644 --- a/dom/media/tests/mochitest/test_peerConnection_remoteReofferRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_remoteReofferRollback.html @@ -35,10 +35,8 @@ }, function PC_REMOTE_ROLLBACK(test) { - return test.setRemoteDescription( - test.pcRemote, - new RTCSessionDescription({ type: "rollback" }), - STABLE) + return test.setRemoteDescription(test.pcRemote, { type: "rollback" }, + STABLE) .then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated()); }, diff --git a/dom/media/tests/mochitest/test_peerConnection_remoteRollback.html b/dom/media/tests/mochitest/test_peerConnection_remoteRollback.html index 099628ab88a3..35a51d03c098 100644 --- a/dom/media/tests/mochitest/test_peerConnection_remoteRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_remoteRollback.html @@ -20,10 +20,8 @@ function PC_REMOTE_ROLLBACK(test) { // We still haven't negotiated the tracks test.pcRemote.expectNegotiationNeeded(); - return test.setRemoteDescription( - test.pcRemote, - new RTCSessionDescription({ type: "rollback" }), - STABLE) + return test.setRemoteDescription(test.pcRemote, { type: "rollback" }, + STABLE) .then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated()); }, diff --git a/dom/media/tests/mochitest/test_peerConnection_restartIceLocalAndRemoteRollback.html b/dom/media/tests/mochitest/test_peerConnection_restartIceLocalAndRemoteRollback.html index e92617164478..d2280cee87be 100644 --- a/dom/media/tests/mochitest/test_peerConnection_restartIceLocalAndRemoteRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_restartIceLocalAndRemoteRollback.html @@ -51,10 +51,8 @@ }, function PC_REMOTE_ROLLBACK(test) { - return test.setRemoteDescription( - test.pcRemote, - new RTCSessionDescription({ type: "rollback" }), - STABLE); + return test.setRemoteDescription(test.pcRemote, { type: "rollback" }, + STABLE); }, function PC_LOCAL_ROLLBACK(test) { diff --git a/dom/media/tests/mochitest/test_peerConnection_restartIceLocalRollback.html b/dom/media/tests/mochitest/test_peerConnection_restartIceLocalRollback.html index c1ac186de1a4..fd9fee9c0c56 100644 --- a/dom/media/tests/mochitest/test_peerConnection_restartIceLocalRollback.html +++ b/dom/media/tests/mochitest/test_peerConnection_restartIceLocalRollback.html @@ -42,11 +42,9 @@ test.pcLocal.iceCheckingIceRollbackExpected = true; }, function PC_LOCAL_ROLLBACK(test) { - return test.setLocalDescription( - test.pcLocal, - new RTCSessionDescription({ type: "rollback", - sdp: ""}), - STABLE); + return test.setLocalDescription(test.pcLocal, + { type: "rollback", sdp: ""}, + STABLE); }, // Rolling back should shut down gathering function PC_LOCAL_WAIT_FOR_END_OF_TRICKLE(test) {