Skip to content

Commit

Permalink
MediaCapabilities: Add "transmission" type.
Browse files Browse the repository at this point in the history
Add "transmission" type for MediaCapabilities.encodingInfo().
Currently it rejects the promise for "transmission" type.

BUG=817382
TEST=Run blink web tests:
1. autoninja -C out/Debug blink_tests
2. python third_party/blink/tools/run_web_tests.py --debug -t Debug \
   third_party/blink/web_tests/media_capabilities/encodingInfo.html
2. python third_party/blink/tools/run_web_tests.py --debug -t Debug \
   third_party/blink/web_tests/media_capabilities/encodingInfo.html \
   third_party/blink/web_tests/external/wpt/media-capabilities/encodingInfo.html

Change-Id: I372ed4aa5eae4cf2011536034bd543bfc9a36c6f
  • Loading branch information
Dean Liao authored and chromium-wpt-export-bot committed Jan 30, 2019
1 parent 64381e1 commit fea1502
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion media-capabilities/encodingInfo.html
Expand Up @@ -287,7 +287,19 @@
assert_equals(typeof ability.smooth, "boolean");
assert_equals(typeof ability.powerEfficient, "boolean");
});
}, "Test that encodingInfo returns a valid MediaCapabilitiesInfo objects");
}, "Test that encodingInfo returns a valid MediaCapabilitiesInfo objects for record type");

promise_test(t => {
return navigator.mediaCapabilities.encodingInfo({
type: 'transmission',
video: minimalVideoConfiguration,
audio: minimalAudioConfiguration,
}).then(ability => {
assert_equals(typeof ability.supported, "boolean");
assert_equals(typeof ability.smooth, "boolean");
assert_equals(typeof ability.powerEfficient, "boolean");
});
}, "Test that encodingInfo returns a valid MediaCapabilitiesInfo objects for transmission type");

async_test(t => {
var validTypes = [ 'record', 'transmission' ];
Expand Down

0 comments on commit fea1502

Please sign in to comment.