mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00
Bug 1818735 [wpt PR 38697] - Remove obsolete stats from validateStatsReport() and reset WPTs., a=testonly
Automatic update from web-platform-tests Remove obsolete stats from validateStatsReport() and reset WPTs. Fix validateStatsReport() not to reference obsolete stuff, including "track", "stream", "sender", "receiver" and "transceiver". Other WPT fixes: - Include "inbound-rtp.trackIdentifier". - Make "remoteId" optional because it only exists after RTCP which is not guaranteed for most uses of validateStatsReport(). - Make RTCRtpParameters-transactionId-expected.txt same every run. - Do what [1] does but for the RTCRtpReceiver test. - Reset existing WPTs and re-enable tests that were "temporarily" disabled and then forgotten about. [1] https://chromium-review.googlesource.com/c/chromium/src/+/4291188 Bug: 1374215 Change-Id: If677c066b5ea9d5387b941935dc997307c15aa70 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288828 Commit-Queue: Philipp Hancke <phancke@microsoft.com> Reviewed-by: Philipp Hancke <phancke@microsoft.com> Commit-Queue: Henrik Boström <hbos@chromium.org> Auto-Submit: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1109554} -- wpt-commits: 027b376acf17807490a99c6e352fc3dbd60c6d7e wpt-pr: 38697
This commit is contained in:
parent
676d3354d5
commit
f8fe62adfd
@ -67,7 +67,9 @@
|
||||
assert_greater_than(param1.transactionId.length, 0);
|
||||
assert_equals(typeof param2.transactionId, "string");
|
||||
assert_greater_than(param2.transactionId.length, 0);
|
||||
assert_equals(param1.transactionId, param2.transactionId);
|
||||
// Don't assert_equals() because the transcation ID is different on each run
|
||||
// which makes the -expected.txt baseline different each failed run.
|
||||
assert_true(param1.transactionId == param2.transactionId);
|
||||
|
||||
await undefined;
|
||||
const param3 = sender.getParameters();
|
||||
@ -89,7 +91,9 @@
|
||||
assert_equals(typeof param2.transactionId, "string");
|
||||
assert_greater_than(param2.transactionId.length, 0);
|
||||
|
||||
assert_equals(param1.transactionId, param2.transactionId);
|
||||
// Don't assert_equals() because the transcation ID is different on each run
|
||||
// which makes the -expected.txt baseline different each failed run.
|
||||
assert_true(param1.transactionId == param2.transactionId);
|
||||
}, `sender.getParameters() should return the same transaction ID if called back-to-back without relinquishing the event loop, even if there is an intervening call to setParameters`);
|
||||
|
||||
promise_test(async t => {
|
||||
|
@ -136,7 +136,7 @@
|
||||
exchangeIceCandidates(caller, callee);
|
||||
exchangeIceCandidates(callee, caller);
|
||||
await exchangeOfferAnswer(caller, callee);
|
||||
await waitForIceStateChange(caller, ['checking']);
|
||||
await waitForIceStateChange(caller, ['connected', 'completed']);
|
||||
const receiver = callee.getReceivers()[0];
|
||||
const statsReport = await receiver.getStats();
|
||||
assert_stats_report_has_stats(statsReport, ['candidate-pair', 'local-candidate', 'remote-candidate']);
|
||||
|
@ -19,8 +19,6 @@
|
||||
"csrc",
|
||||
"peer-connection",
|
||||
"data-channel",
|
||||
"stream",
|
||||
"track",
|
||||
"transport",
|
||||
"candidate-pair",
|
||||
"local-candidate",
|
||||
@ -39,9 +37,6 @@ const statsValidatorTable = {
|
||||
'csrc': validateContributingSourceStats,
|
||||
'peer-connection': validatePeerConnectionStats,
|
||||
'data-channel': validateDataChannelStats,
|
||||
'transceiver': validateTransceiverStats,
|
||||
'sender': validateSenderStats,
|
||||
'receiver': validateReceiverStats,
|
||||
'transport': validateTransportStats,
|
||||
'candidate-pair': validateIceCandidatePairStats,
|
||||
'local-candidate': validateIceCandidateStats,
|
||||
@ -271,8 +266,7 @@ function validateReceivedRtpStreamStats(statsReport, stats) {
|
||||
[webrtc-stats]
|
||||
7.4. RTCInboundRtpStreamStats dictionary
|
||||
dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
|
||||
DOMString trackId;
|
||||
DOMString receiverId;
|
||||
DOMString trackIdentifier;
|
||||
DOMString remoteId;
|
||||
unsigned long framesDecoded;
|
||||
unsigned long keyFramesDecoded;
|
||||
@ -319,13 +313,12 @@ function validateReceivedRtpStreamStats(statsReport, stats) {
|
||||
[webrtc-pc]
|
||||
8.6. Mandatory To Implement Stats
|
||||
- RTCInboundRtpStreamStats, with all required attributes from its inherited
|
||||
dictionaries, and also attributes receiverId, remoteId, framesDecoded, nackCount, framesReceived, bytesReceived, totalAudioEnergy, totalSampleDuration
|
||||
dictionaries, and also attributes remoteId, framesDecoded, nackCount, framesReceived, bytesReceived, totalAudioEnergy, totalSampleDuration
|
||||
*/
|
||||
function validateInboundRtpStreamStats(statsReport, stats) {
|
||||
validateReceivedRtpStreamStats(statsReport, stats);
|
||||
validateOptionalIdField(statsReport, stats, 'trackId', 'track');
|
||||
validateIdField(statsReport, stats, 'receiverId', 'receiver');
|
||||
validateIdField(statsReport, stats, 'remoteId', 'remote-outbound-rtp');
|
||||
assert_string_field(stats, 'trackIdentifier');
|
||||
validateOptionalIdField(statsReport, stats, 'remoteId', 'remote-outbound-rtp');
|
||||
assert_unsigned_int_field(stats, 'framesDecoded');
|
||||
assert_optional_unsigned_int_field(stats, 'keyFramesDecoded');
|
||||
assert_optional_unsigned_int_field(stats, 'frameWidth');
|
||||
@ -438,7 +431,6 @@ function validateSentRtpStreamStats(statsReport, stats) {
|
||||
7.7. RTCOutboundRtpStreamStats dictionary
|
||||
dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
|
||||
DOMString mediaSourceId;
|
||||
DOMString senderId;
|
||||
DOMString remoteId;
|
||||
DOMString rid;
|
||||
DOMHighResTimeStamp lastPacketSentTimestamp;
|
||||
@ -477,21 +469,16 @@ function validateSentRtpStreamStats(statsReport, stats) {
|
||||
unsigned long sliCount;
|
||||
DOMString encoderImplementation;
|
||||
};
|
||||
Obsolete members:
|
||||
partial dictionary RTCOutboundStreamStats {
|
||||
DOMString trackId;
|
||||
};
|
||||
[webrtc-pc]
|
||||
8.6. Mandatory To Implement Stats
|
||||
- RTCOutboundRtpStreamStats, with all required attributes from its
|
||||
inherited dictionaries, and also attributes senderId, remoteId, framesEncoded, nackCount, framesSent
|
||||
inherited dictionaries, and also attributes remoteId, framesEncoded, nackCount, framesSent
|
||||
*/
|
||||
function validateOutboundRtpStreamStats(statsReport, stats) {
|
||||
validateSentRtpStreamStats(statsReport, stats)
|
||||
|
||||
validateOptionalIdField(statsReport, stats, 'mediaSourceId', 'media-source');
|
||||
validateIdField(statsReport, stats, 'senderId', 'sender');
|
||||
validateIdField(statsReport, stats, 'remoteId', 'remote-inbound-rtp');
|
||||
validateOptionalIdField(statsReport, stats, 'remoteId', 'remote-inbound-rtp');
|
||||
|
||||
assert_optional_string_field(stats, 'rid');
|
||||
|
||||
@ -561,8 +548,6 @@ function validateOutboundRtpStreamStats(statsReport, stats) {
|
||||
assert_optional_string_field(stats, 'encoderImplementation');
|
||||
assert_optional_boolean_field(stats, 'powerEfficientEncoder');
|
||||
assert_optional_string_field(stats, 'scalabilityMode');
|
||||
// Obsolete stats
|
||||
validateOptionalIdField(statsReport, stats, 'trackId', 'track');
|
||||
}
|
||||
|
||||
/*
|
||||
@ -681,94 +666,6 @@ function validatePeerConnectionStats(statsReport, stats) {
|
||||
assert_optional_unsigned_int_field(stats, 'dataChannelsAccepted');
|
||||
}
|
||||
|
||||
/* [webrtc-stats]
|
||||
7.16 RTCRtpTransceiverStats dictionary
|
||||
dictionary RTCRtpTransceiverStats {
|
||||
DOMString senderId;
|
||||
DOMString receiverId;
|
||||
DOMString mid;
|
||||
};
|
||||
*/
|
||||
function validateTransceiverStats(statsReport, stats) {
|
||||
validateRtcStats(statsReport, stats);
|
||||
validateOptionalIdField(statsReport, stats, 'senderId', 'sender');
|
||||
validateOptionalIdField(statsReport, stats, 'receiverId', 'sender');
|
||||
assert_optional_string_field(stats, 'mid');
|
||||
}
|
||||
|
||||
/*
|
||||
[webrtc-stats]
|
||||
dictionary RTCMediaHandlerStats : RTCStats {
|
||||
DOMString trackIdentifier;
|
||||
boolean remoteSource;
|
||||
boolean ended;
|
||||
DOMString kind;
|
||||
RTCPriorityType priority;
|
||||
};
|
||||
dictionary RTCVideoHandlerStats : RTCMediaHandlerStats {
|
||||
};
|
||||
dictionary RTCAudioHandlerStats : RTCMediaHandlerStats {
|
||||
};
|
||||
Used from validateSenderStats and validateReceiverStats
|
||||
|
||||
[webrtc-priority]
|
||||
enum RTCPriorityType {
|
||||
"very-low",
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
};
|
||||
|
||||
[webrtc-pc]
|
||||
MTI:
|
||||
RTCMediaHandlerStats with attributes trackIdentifier
|
||||
RTCAudioHandlerStats, with all required attributes from its inherited dictionaries
|
||||
RTCVideoHandlerStats, with all required attributes from its inherited dictionaries
|
||||
|
||||
*/
|
||||
function validateMediaHandlerStats(statsReport, stats) {
|
||||
validateRtcStats(statsReport, stats);
|
||||
assert_string_field(stats, 'trackIdentifier');
|
||||
assert_optional_boolean_field(stats, 'remoteSource');
|
||||
assert_optional_boolean_field(stats, 'ended');
|
||||
assert_optional_string_field(stats, 'kind');
|
||||
assert_enum_field(stats, 'priority', ['very-low', 'low', 'medium', 'high']);
|
||||
}
|
||||
|
||||
/*
|
||||
[webrtc-stats]
|
||||
dictionary RTCAudioSenderStats : RTCAudioHandlerStats {
|
||||
DOMString mediaSourceId;
|
||||
};
|
||||
dictionary RTCVideoSenderStats : RTCVideoHandlerStats {
|
||||
DOMString mediaSourceId;
|
||||
};
|
||||
|
||||
[webrtc-pc]
|
||||
MTI:
|
||||
RTCVideoSenderStats, with all required attributes from its inherited dictionaries
|
||||
*/
|
||||
function validateSenderStats(statsReport, stats) {
|
||||
validateMediaHandlerStats(statsReport, stats);
|
||||
validateOptionalIdField(statsReport, stats, 'mediaSourceId', 'media-source');
|
||||
}
|
||||
|
||||
/*
|
||||
[webrtc-stats]
|
||||
dictionary RTCAudioReceiverStats : RTCAudioHandlerStats {
|
||||
};
|
||||
dictionary RTCVideoReceiverStats : RTCVideoHandlerStats {
|
||||
};
|
||||
|
||||
[webrtc-pc]
|
||||
MTI:
|
||||
RTCVideoReceiverStats, with all required attributes from its inherited dictionaries
|
||||
*/
|
||||
function validateReceiverStats(statsReport, stats) {
|
||||
validateMediaHandlerStats(statsReport, stats);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
[webrtc-stats]
|
||||
7.13. RTCDataChannelStats dictionary
|
||||
|
Loading…
x
Reference in New Issue
Block a user