mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
Issue #2332 - Update most tests to skip RTCSessionDescription construction
Backport of https://bugzilla.mozilla.org/show_bug.cgi?id=1263312 part 6
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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 =
|
||||
@@ -1064,7 +1064,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;
|
||||
@@ -1078,7 +1078,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
|
||||
*/
|
||||
@@ -1095,7 +1095,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;
|
||||
@@ -1115,7 +1115,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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
},
|
||||
|
||||
|
||||
@@ -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());
|
||||
},
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user