зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1263312 - Update most tests to skip RTCSessionDescription construction. r=drno
MozReview-Commit-ID: KOzT2av1bLj --HG-- extra : rebase_source : cdf9cec41a2569b4299b8e8ea735a482566ff595
This commit is contained in:
Родитель
53f57a6466
Коммит
f49ca55db4
|
@ -86,8 +86,7 @@ function testMultipleFingerprints() {
|
||||||
fingerprintSdp(fingerprints.slice(1)) +
|
fingerprintSdp(fingerprints.slice(1)) +
|
||||||
offer.sdp.slice(match.index);
|
offer.sdp.slice(match.index);
|
||||||
|
|
||||||
var desc = new RTCSessionDescription({ type: 'offer', sdp: sdp });
|
return pcStrict.setRemoteDescription({ type: 'offer', sdp });
|
||||||
return pcStrict.setRemoteDescription(desc);
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ok(true, 'Modified fingerprints were accepted');
|
ok(true, 'Modified fingerprints were accepted');
|
||||||
|
|
|
@ -334,7 +334,7 @@ PeerConnectionTest.prototype.createOffer = function(peer) {
|
||||||
*
|
*
|
||||||
* @param {PeerConnectionWrapper} peer
|
* @param {PeerConnectionWrapper} peer
|
||||||
The peer connection wrapper to run the command on
|
The peer connection wrapper to run the command on
|
||||||
* @param {RTCSessionDescription} desc
|
* @param {RTCSessionDescriptionInit} desc
|
||||||
* Session description for the local description request
|
* Session description for the local description request
|
||||||
*/
|
*/
|
||||||
PeerConnectionTest.prototype.setLocalDescription =
|
PeerConnectionTest.prototype.setLocalDescription =
|
||||||
|
@ -403,7 +403,7 @@ PeerConnectionTest.prototype.setOfferOptions = function(options) {
|
||||||
*
|
*
|
||||||
* @param {PeerConnectionWrapper} peer
|
* @param {PeerConnectionWrapper} peer
|
||||||
The peer connection wrapper to run the command on
|
The peer connection wrapper to run the command on
|
||||||
* @param {RTCSessionDescription} desc
|
* @param {RTCSessionDescriptionInit} desc
|
||||||
* Session description for the remote description request
|
* Session description for the remote description request
|
||||||
*/
|
*/
|
||||||
PeerConnectionTest.prototype.setRemoteDescription =
|
PeerConnectionTest.prototype.setRemoteDescription =
|
||||||
|
@ -1071,7 +1071,7 @@ PeerConnectionWrapper.prototype = {
|
||||||
* Sets the local description and automatically handles the failure case.
|
* Sets the local description and automatically handles the failure case.
|
||||||
*
|
*
|
||||||
* @param {object} desc
|
* @param {object} desc
|
||||||
* RTCSessionDescription for the local description request
|
* RTCSessionDescriptionInit for the local description request
|
||||||
*/
|
*/
|
||||||
setLocalDescription : function(desc) {
|
setLocalDescription : function(desc) {
|
||||||
this.observedNegotiationNeeded = undefined;
|
this.observedNegotiationNeeded = undefined;
|
||||||
|
@ -1085,7 +1085,7 @@ PeerConnectionWrapper.prototype = {
|
||||||
* causes the test case to fail if the call succeeds.
|
* causes the test case to fail if the call succeeds.
|
||||||
*
|
*
|
||||||
* @param {object} desc
|
* @param {object} desc
|
||||||
* RTCSessionDescription for the local description request
|
* RTCSessionDescriptionInit for the local description request
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
* A promise that resolves to the expected error
|
* A promise that resolves to the expected error
|
||||||
*/
|
*/
|
||||||
|
@ -1102,7 +1102,7 @@ PeerConnectionWrapper.prototype = {
|
||||||
* Sets the remote description and automatically handles the failure case.
|
* Sets the remote description and automatically handles the failure case.
|
||||||
*
|
*
|
||||||
* @param {object} desc
|
* @param {object} desc
|
||||||
* RTCSessionDescription for the remote description request
|
* RTCSessionDescriptionInit for the remote description request
|
||||||
*/
|
*/
|
||||||
setRemoteDescription : function(desc) {
|
setRemoteDescription : function(desc) {
|
||||||
this.observedNegotiationNeeded = undefined;
|
this.observedNegotiationNeeded = undefined;
|
||||||
|
@ -1122,7 +1122,7 @@ PeerConnectionWrapper.prototype = {
|
||||||
* causes the test case to fail if the call succeeds.
|
* causes the test case to fail if the call succeeds.
|
||||||
*
|
*
|
||||||
* @param {object} desc
|
* @param {object} desc
|
||||||
* RTCSessionDescription for the remote description request
|
* RTCSessionDescriptionInit for the remote description request
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
* a promise that resolve to the returned error
|
* a promise that resolve to the returned error
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
function testSetLocalDescriptionError() {
|
function testSetLocalDescriptionError() {
|
||||||
var pc = new RTCPeerConnection();
|
var pc = new RTCPeerConnection();
|
||||||
info ("Testing setLocalDescription error");
|
info ("Testing setLocalDescription error");
|
||||||
return pc.setLocalDescription(new RTCSessionDescription({ sdp: "Picklechips!",
|
return pc.setLocalDescription({ sdp: "Picklechips!", type: "offer" })
|
||||||
type: "offer" }))
|
|
||||||
.then(generateErrorCallback("setLocalDescription with nonsense SDP should fail"),
|
.then(generateErrorCallback("setLocalDescription with nonsense SDP should fail"),
|
||||||
validateReason);
|
validateReason);
|
||||||
};
|
};
|
||||||
|
@ -36,8 +35,7 @@
|
||||||
function testSetRemoteDescriptionError() {
|
function testSetRemoteDescriptionError() {
|
||||||
var pc = new RTCPeerConnection();
|
var pc = new RTCPeerConnection();
|
||||||
info ("Testing setRemoteDescription error");
|
info ("Testing setRemoteDescription error");
|
||||||
return pc.setRemoteDescription(new RTCSessionDescription({ sdp: "Who?",
|
return pc.setRemoteDescription({ sdp: "Who?", type: "offer" })
|
||||||
type: "offer" }))
|
|
||||||
.then(generateErrorCallback("setRemoteDescription with nonsense SDP should fail"),
|
.then(generateErrorCallback("setRemoteDescription with nonsense SDP should fail"),
|
||||||
validateReason);
|
validateReason);
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,9 +37,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
function PC_REMOTE_ROLLBACK(test) {
|
function PC_REMOTE_ROLLBACK(test) {
|
||||||
return test.setLocalDescription(
|
return test.setLocalDescription(test.pcRemote,
|
||||||
test.pcRemote,
|
{ type: "rollback", sdp: "" },
|
||||||
new RTCSessionDescription({ type: "rollback", sdp: ""}),
|
|
||||||
STABLE);
|
STABLE);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
function PC_REMOTE_ROLLBACK(test) {
|
function PC_REMOTE_ROLLBACK(test) {
|
||||||
return test.setLocalDescription(
|
return test.setLocalDescription(test.pcRemote,
|
||||||
test.pcRemote,
|
{ type: "rollback", sdp: "" },
|
||||||
new RTCSessionDescription({ type: "rollback", sdp: ""}),
|
|
||||||
STABLE);
|
STABLE);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
function PC_REMOTE_ROLLBACK(test) {
|
function PC_REMOTE_ROLLBACK(test) {
|
||||||
return test.setRemoteDescription(
|
return test.setRemoteDescription(test.pcRemote, { type: "rollback" },
|
||||||
test.pcRemote,
|
|
||||||
new RTCSessionDescription({ type: "rollback" }),
|
|
||||||
STABLE)
|
STABLE)
|
||||||
.then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated());
|
.then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated());
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
function PC_REMOTE_ROLLBACK(test) {
|
function PC_REMOTE_ROLLBACK(test) {
|
||||||
// We still haven't negotiated the tracks
|
// We still haven't negotiated the tracks
|
||||||
test.pcRemote.expectNegotiationNeeded();
|
test.pcRemote.expectNegotiationNeeded();
|
||||||
return test.setRemoteDescription(
|
return test.setRemoteDescription(test.pcRemote, { type: "rollback" },
|
||||||
test.pcRemote,
|
|
||||||
new RTCSessionDescription({ type: "rollback" }),
|
|
||||||
STABLE)
|
STABLE)
|
||||||
.then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated());
|
.then(() => test.pcRemote.rollbackRemoteTracksIfNotNegotiated());
|
||||||
},
|
},
|
||||||
|
|
|
@ -51,9 +51,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
function PC_REMOTE_ROLLBACK(test) {
|
function PC_REMOTE_ROLLBACK(test) {
|
||||||
return test.setRemoteDescription(
|
return test.setRemoteDescription(test.pcRemote, { type: "rollback" },
|
||||||
test.pcRemote,
|
|
||||||
new RTCSessionDescription({ type: "rollback" }),
|
|
||||||
STABLE);
|
STABLE);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -42,10 +42,8 @@
|
||||||
test.pcLocal.iceCheckingIceRollbackExpected = true;
|
test.pcLocal.iceCheckingIceRollbackExpected = true;
|
||||||
},
|
},
|
||||||
function PC_LOCAL_ROLLBACK(test) {
|
function PC_LOCAL_ROLLBACK(test) {
|
||||||
return test.setLocalDescription(
|
return test.setLocalDescription(test.pcLocal,
|
||||||
test.pcLocal,
|
{ type: "rollback", sdp: ""},
|
||||||
new RTCSessionDescription({ type: "rollback",
|
|
||||||
sdp: ""}),
|
|
||||||
STABLE);
|
STABLE);
|
||||||
},
|
},
|
||||||
// Rolling back should shut down gathering
|
// Rolling back should shut down gathering
|
||||||
|
|
Загрузка…
Ссылка в новой задаче