mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision b'b6f6bf16fe6069aed53d28af86a79b8ff4963844'
This commit is contained in:
parent
0720f4f736
commit
8bfdc02dd8
590 changed files with 11442 additions and 3709 deletions
|
@ -5,6 +5,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/webrtc/dictionary-helper.js"></script>
|
||||
<script src="/webrtc/RTCRtpParameters-helper.js"></script>
|
||||
<script src="/webrtc/third_party/sdp/sdp.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
|
@ -27,11 +28,6 @@ test(function(t) {
|
|||
capability.direction != "stopped";
|
||||
});
|
||||
assert_not_equals(capability, undefined);
|
||||
capability = capabilities.find((capability) => {
|
||||
return capability.uri == "urn:3gpp:video-orientation" &&
|
||||
capability.direction != "stopped";
|
||||
});
|
||||
assert_not_equals(capability, undefined);
|
||||
}, `the video transceiver.headerExtensionsToOffer() includes mandatory extensions`);
|
||||
|
||||
test(function(t) {
|
||||
|
@ -129,8 +125,7 @@ promise_test(async t => {
|
|||
const capabilities = transceiver.headerExtensionsToOffer;
|
||||
const selected_capability = capabilities.find((capability) => {
|
||||
return capability.direction == "sendrecv" &&
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid" &&
|
||||
capability.uri != "urn:3gpp:video-orientation";
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid";
|
||||
});
|
||||
selected_capability.direction = "stopped";
|
||||
transceiver.setOfferedRtpHeaderExtensions(capabilities);
|
||||
|
@ -160,8 +155,7 @@ promise_test(async t => {
|
|||
const capabilities = transceiver.headerExtensionsToOffer;
|
||||
const selected_capability = capabilities.find((capability) => {
|
||||
return capability.direction == "sendrecv" &&
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid" &&
|
||||
capability.uri != "urn:3gpp:video-orientation";
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid";
|
||||
});
|
||||
selected_capability.direction = "stopped";
|
||||
transceiver.setOfferedRtpHeaderExtensions(capabilities);
|
||||
|
@ -193,8 +187,7 @@ promise_test(async t => {
|
|||
const capabilities = transceiver.headerExtensionsToOffer;
|
||||
const selected_capability = capabilities.find((capability) => {
|
||||
return capability.direction == "sendrecv" &&
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid" &&
|
||||
capability.uri != "urn:3gpp:video-orientation";
|
||||
capability.uri != "urn:ietf:params:rtp-hdrext:sdes:mid";
|
||||
});
|
||||
selected_capability.direction = "stopped";
|
||||
transceiver.setOfferedRtpHeaderExtensions(capabilities);
|
||||
|
@ -216,4 +209,34 @@ promise_test(async t => {
|
|||
}
|
||||
}, `the set of negotiated extensions is the set of unstopped extensions`);
|
||||
|
||||
promise_test(async t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
||||
const t1 = pc.addTransceiver('video');
|
||||
const t2 = pc.addTransceiver('video');
|
||||
const extensionUri = 'urn:3gpp:video-orientation';
|
||||
|
||||
assert_true(!!t1.headerExtensionsToOffer.find(ext => ext.uri === extensionUri));
|
||||
const ext1 = t1.headerExtensionsToOffer;
|
||||
ext1.find(ext => ext.uri === extensionUri).direction = 'stopped';
|
||||
t1.setOfferedRtpHeaderExtensions(ext1);
|
||||
|
||||
assert_true(!!t2.headerExtensionsToOffer.find(ext => ext.uri === extensionUri));
|
||||
const ext2 = t2.headerExtensionsToOffer;
|
||||
ext2.find(ext => ext.uri === extensionUri).direction = 'sendrecv';
|
||||
t2.setOfferedRtpHeaderExtensions(ext2);
|
||||
|
||||
const offer = await pc.createOffer();
|
||||
const sections = SDPUtils.splitSections(offer.sdp);
|
||||
sections.shift();
|
||||
const extensions = sections.map(section => {
|
||||
return SDPUtils.matchPrefix(section, 'a=extmap:')
|
||||
.map(SDPUtils.parseExtmap);
|
||||
});
|
||||
assert_equals(extensions.length, 2);
|
||||
assert_false(!!extensions[0].find(extension => extension.uri === extensionUri));
|
||||
assert_true(!!extensions[1].find(extension => extension.uri === extensionUri));
|
||||
}, 'Extensions can be deactivated on a per-mline basis');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue