mirror of
https://github.com/servo/servo.git
synced 2025-08-19 04:15:33 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue