mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 20:25:44 +00:00
Bug 1526499 [wpt PR 15132] - Add support for all RTCIceCandidate fields., a=testonly
Automatic update from web-platform-tests Add support for all RTCIceCandidate fields. Intent to implement and ship thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/T6zlVFZhRVY Drive-by: Fix a few minor lint issues. Bug: 683094 Change-Id: I1c8cb27e8583f200d6e4d9fe6f2d1b633e8dab66 Reviewed-on: https://chromium-review.googlesource.com/c/1429969 Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#628324} -- wpt-commits: 932df409e4c23f7cba3fe2e634426b4429694df0 wpt-pr: 15132
This commit is contained in:
parent
ad1121ad59
commit
6bb346ce51
@ -6,6 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
const candidateString = 'candidate:1905690388 1 udp 2113937151 192.168.0.1 58041 typ host generation 0 ufrag thC8 network-cost 50';
|
||||
const candidateString2 = 'candidate:435653019 2 tcp 1845501695 192.168.0.196 4444 typ srflx raddr www.example.com rport 22222 tcptype active';
|
||||
const arbitraryString = '<arbitrary string[0] content>;';
|
||||
|
||||
test(t => {
|
||||
@ -162,8 +163,45 @@
|
||||
assert_equals(candidate.sdpMid, 'video', 'sdpMid');
|
||||
assert_equals(candidate.sdpMLineIndex, 1, 'sdpMLineIndex');
|
||||
assert_equals(candidate.usernameFragment, 'test', 'usernameFragment');
|
||||
}, 'new RTCIceCandidate({ ... }) with non default value for all fields');
|
||||
|
||||
// The following fields should match those in the candidate field
|
||||
assert_equals(candidate.foundation, '1905690388', 'foundation');
|
||||
assert_equals(candidate.component, 'rtp', 'component');
|
||||
assert_equals(candidate.priority, 2113937151, 'priority');
|
||||
assert_equals(candidate.address, '192.168.0.1', 'address');
|
||||
assert_equals(candidate.protocol, 'udp', 'protocol');
|
||||
assert_equals(candidate.port, 58041, 'port');
|
||||
assert_equals(candidate.type, 'host', 'type');
|
||||
assert_equals(candidate.tcpType, '', 'tcpType');
|
||||
assert_equals(candidate.relatedAddress, null, 'relatedAddress');
|
||||
assert_equals(candidate.relatedPort, null, 'relatedPort');
|
||||
}, 'new RTCIceCandidate({ ... }) with nondefault values for all fields');
|
||||
|
||||
test(t => {
|
||||
const candidate = new RTCIceCandidate({
|
||||
candidate: candidateString2,
|
||||
sdpMid: 'video',
|
||||
sdpMLineIndex: 1,
|
||||
usernameFragment: 'user1'
|
||||
});
|
||||
|
||||
assert_equals(candidate.candidate, candidateString2, 'candidate');
|
||||
assert_equals(candidate.sdpMid, 'video', 'sdpMid');
|
||||
assert_equals(candidate.sdpMLineIndex, 1, 'sdpMLineIndex');
|
||||
assert_equals(candidate.usernameFragment, 'user1', 'usernameFragment');
|
||||
|
||||
// The following fields should match those in the candidate field
|
||||
assert_equals(candidate.foundation, '435653019', 'foundation');
|
||||
assert_equals(candidate.component, 'rtcp', 'component');
|
||||
assert_equals(candidate.priority, 1845501695, 'priority');
|
||||
assert_equals(candidate.address, '192.168.0.196', 'address');
|
||||
assert_equals(candidate.protocol, 'tcp', 'protocol');
|
||||
assert_equals(candidate.port, 4444, 'port');
|
||||
assert_equals(candidate.type, 'srflx', 'type');
|
||||
assert_equals(candidate.tcpType, 'active', 'tcpType');
|
||||
assert_equals(candidate.relatedAddress, 'www.example.com', 'relatedAddress');
|
||||
assert_equals(candidate.relatedPort, 22222, 'relatedPort');
|
||||
}, 'new RTCIceCandidate({ ... }) with nondefault values for all fields, tcp candidate');
|
||||
|
||||
test(t => {
|
||||
// sdpMid is not validated in RTCIceCandidate
|
||||
|
Loading…
Reference in New Issue
Block a user