Commit 59fe4497 authored by Florent Castelli's avatar Florent Castelli Committed by Commit Bot

Remove and fix non-spec compliant WebRTC tests

Bug: 803494
Change-Id: Ic9efe4adba6909f6af3dbcf90d64debeef216480
Reviewed-on: https://chromium-review.googlesource.com/c/1257786Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596244}
parent a0c1fc31
......@@ -3,8 +3,7 @@ FAIL addTransceiver() with undefined sendEncodings should have default encoding
FAIL addTransceiver() with empty list sendEncodings should have default encoding parameter with active set to true promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL sender.getParameters() should return sendEncodings set by addTransceiver() promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL sender.setParameters() with mismatch number of encodings should reject with InvalidModificationError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL sender.setParameters() with encodings unset should reject with InvalidModificationError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL setParameters() with modified encoding.rtx field should reject with InvalidModificationError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL sender.setParameters() with encodings unset should reject with TypeError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL setParameters() with modified encoding.rid field should reject with InvalidModificationError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL setParameters() with encoding.scaleResolutionDownBy field set to less than 1.0 should reject with RangeError promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
FAIL setParameters() with encoding.scaleResolutionDownBy field set to greater than 1.0 should succeed promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
......
......@@ -45,15 +45,6 @@
};
dictionary RTCRtpEncodingParameters {
[readonly]
unsigned long ssrc;
[readonly]
RTCRtpRtxParameters rtx;
[readonly]
RTCRtpFecParameters fec;
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
......@@ -67,16 +58,6 @@
double scaleResolutionDownBy;
};
dictionary RTCRtpRtxParameters {
[readonly]
unsigned long ssrc;
};
dictionary RTCRtpFecParameters {
[readonly]
unsigned long ssrc;
};
enum RTCDtxStatus {
"disabled",
"enabled"
......@@ -229,32 +210,9 @@
param.encodings = undefined;
return promise_rejects(t, 'InvalidModificationError',
sender.setParameters(param));
}, `sender.setParameters() with encodings unset should reject with InvalidModificationError`);
promise_test(async t => {
const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close());
const { sender } = pc.addTransceiver('audio');
await doOfferAnswerExchange(t, pc);
const param = sender.getParameters();
validateSenderRtpParameters(param);
const encoding = getFirstEncoding(param);
const { rtx } = encoding;
if(rtx === undefined) {
encoding.rtx = { ssrc: 2 };
} else if(rtx.ssrc === undefined) {
rtx.ssrc = 2;
} else {
rtx.ssrc += 1;
}
return promise_rejects(t, 'InvalidModificationError',
return promise_rejects(t, new TypeError(),
sender.setParameters(param));
}, `setParameters() with modified encoding.rtx field should reject with InvalidModificationError`);
}, `sender.setParameters() with encodings unset should reject with TypeError`);
promise_test(async t => {
const pc = new RTCPeerConnection();
......
......@@ -69,11 +69,6 @@ function validateSenderRtpParameters(param) {
When getParameters is called, the RTCRtpParameters dictionary is constructed
as follows:
- encodings is populated based on SSRCs and RIDs present in the current remote
description, including SSRCs used for RTX and FEC, if signaled. Every member
of the RTCRtpEncodingParameters dictionaries other than the SSRC and RID fields
is left undefined.
- The headerExtensions sequence is populated based on the header extensions that
the receiver is currently prepared to receive.
......@@ -144,15 +139,6 @@ function validateRtpParameters(param) {
/*
dictionary RTCRtpEncodingParameters {
[readonly]
unsigned long ssrc;
[readonly]
RTCRtpRtxParameters rtx;
[readonly]
RTCRtpFecParameters fec;
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
......@@ -166,16 +152,6 @@ function validateRtpParameters(param) {
double scaleResolutionDownBy;
};
dictionary RTCRtpRtxParameters {
[readonly]
unsigned long ssrc;
};
dictionary RTCRtpFecParameters {
[readonly]
unsigned long ssrc;
};
enum RTCDtxStatus {
"disabled",
"enabled"
......@@ -189,18 +165,6 @@ function validateRtpParameters(param) {
};
*/
function validateEncodingParameters(encoding) {
assert_optional_unsigned_int_field(encoding, 'ssrc');
assert_optional_dict_field(encoding, 'rtx');
if(encoding.rtx) {
assert_unsigned_int_field(encoding.rtx, 'ssrc');
}
assert_optional_dict_field(encoding, 'fec');
if(encoding.fec) {
assert_unsigned_int_field(encoding.fec, 'ssrc');
}
assert_optional_enum_field(encoding, 'dtx',
['disabled', 'enabled']);
......
......@@ -22,11 +22,6 @@
When getParameters is called, the RTCRtpParameters dictionary is constructed
as follows:
- encodings is populated based on SSRCs and RIDs present in the current remote
description, including SSRCs used for RTX and FEC, if signaled. Every member
of the RTCRtpEncodingParameters dictionaries other than the SSRC and RID fields
is left undefined.
- The headerExtensions sequence is populated based on the header extensions that
the receiver is currently prepared to receive.
......
......@@ -3,8 +3,7 @@ PASS addTransceiver() with undefined sendEncodings should have default encoding
PASS addTransceiver() with empty list sendEncodings should have default encoding parameter with active set to true
FAIL sender.getParameters() should return sendEncodings set by addTransceiver() promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Failed to set remote audio description send parameters."
PASS sender.setParameters() with mismatch number of encodings should reject with InvalidModificationError
FAIL sender.setParameters() with encodings unset should reject with InvalidModificationError assert_throws: function "function() { throw e }" threw object "TypeError: Failed to execute 'setParameters' on 'RTCRtpSender': required member encodings is undefined." that is not a DOMException InvalidModificationError: property "code" is equal to undefined, expected 13
FAIL setParameters() with modified encoding.rtx field should reject with InvalidModificationError assert_unreached: Should have rejected: undefined Reached unreachable code
PASS sender.setParameters() with encodings unset should reject with TypeError
FAIL setParameters() with modified encoding.rid field should reject with InvalidModificationError assert_equals: expected (string) "foo" but got (undefined) undefined
FAIL setParameters() with encoding.scaleResolutionDownBy field set to less than 1.0 should reject with RangeError assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL setParameters() with encoding.scaleResolutionDownBy field set to greater than 1.0 should succeed assert_approx_equals: expected a number but got a "undefined"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment