Skip to content

Commit

Permalink
Remove and fix non-spec compliant WebRTC tests
Browse files Browse the repository at this point in the history
Bug: 803494
Change-Id: Ic9efe4adba6909f6af3dbcf90d64debeef216480
Reviewed-on: https://chromium-review.googlesource.com/c/1257786
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596244}
  • Loading branch information
Orphis authored and chromium-wpt-export-bot committed Oct 3, 2018
1 parent 6563827 commit ca3d628
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 85 deletions.
46 changes: 2 additions & 44 deletions webrtc/RTCRtpParameters-encodings.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
};
dictionary RTCRtpEncodingParameters {
[readonly]
unsigned long ssrc;
[readonly]
RTCRtpRtxParameters rtx;
[readonly]
RTCRtpFecParameters fec;
RTCDtxStatus dtx;
boolean active;
RTCPriorityType priority;
Expand All @@ -67,16 +58,6 @@
double scaleResolutionDownBy;
};
dictionary RTCRtpRtxParameters {
[readonly]
unsigned long ssrc;
};
dictionary RTCRtpFecParameters {
[readonly]
unsigned long ssrc;
};
enum RTCDtxStatus {
"disabled",
"enabled"
Expand Down Expand Up @@ -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();
Expand Down
36 changes: 0 additions & 36 deletions webrtc/RTCRtpParameters-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand All @@ -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"
Expand All @@ -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']);

Expand Down
5 changes: 0 additions & 5 deletions webrtc/RTCRtpReceiver-getParameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ca3d628

Please sign in to comment.