Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -14,18 +14,16 @@ getUserMedia is handled as optional</p>
<div id='log'></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
<script>
var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional", {timeout:10000});
t.step(function() {
navigator.getUserMedia({video: {advanced: [{width: {min:1024, max: 800}}]}},
t.step_func(function (stream) {
assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
t.done();
}),
t.step_func(function(error) {
assert_unreached("an optional constraint can't stop us from obtaining a video stream");
}));
navigator.mediaDevices.getUserMedia({video: {advanced: [{width: {min:1024, max: 800}}]}})
.then(t.step_func(function (stream) {
assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
t.done();
}), t.step_func(function(error) {
assert_unreached("an optional constraint can't stop us from obtaining a video stream");
}));
});
</script>
</body>