Files
tubestation/testing/web-platform/tests/webrtc/RTCRtpReceiver-getCapabilities.html
Florent Castelli de4d1f4f0e Bug 1475092 [wpt PR 11924] - Implement RTCRtpSender/Receiver.getCapabilities(), a=testonly
Automatic update from web-platform-testsImplement RTCRtpSender/Receiver.getCapabilities()

Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/_ktwAuFRUAg/mh_ECO41AQAJ

Bug: 857451
Change-Id: I8c1973e0346a9db71c4dc1fbfc82e3396c48c5ad
Reviewed-on: https://chromium-review.googlesource.com/1133386
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576562}

--

wpt-commits: 408b82af9267126a33d65e5b4c34dc26145df936
wpt-pr: 11924
2018-07-29 18:52:49 +01:00

40 lines
1.3 KiB
HTML

<!doctype html>
<meta charset=utf-8>
<title>RTCRtpReceiver.getCapabilities</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="dictionary-helper.js"></script>
<script src="RTCRtpCapabilities-helper.js"></script>
<script>
'use strict';
// Test is based on the following editor draft:
// https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html
// The following helper functions are called from RTCRtpCapabilities-helper.js:
// validateRtpCapabilities
/*
5.3. RTCRtpReceiver Interface
interface RTCRtpReceiver {
...
static RTCRtpCapabilities getCapabilities(DOMString kind);
};
*/
test(() => {
const capabilities = RTCRtpReceiver.getCapabilities('audio');
validateRtpCapabilities(capabilities);
}, `RTCRtpSender.getCapabilities('audio') should return RTCRtpCapabilities dictionary`);
test(() => {
const capabilities = RTCRtpReceiver.getCapabilities('video');
validateRtpCapabilities(capabilities);
}, `RTCRtpSender.getCapabilities('video') should return RTCRtpCapabilities dictionary`);
test(() => {
const capabilities = RTCRtpReceiver.getCapabilities('dummy');
assert_equals(capabilities, null);
}, `RTCRtpSender.getCapabilities('dummy') should return null`);
</script>