Update web-platform-tests to revision 1829a42c93e435937db68c8a842fa9b56dd39dc2

This commit is contained in:
WPT Sync Bot 2018-05-30 21:11:46 -04:00
parent 9f142b9c22
commit 46e1e26950
72 changed files with 1286 additions and 1091 deletions

View file

@ -64,6 +64,34 @@ promise_test(t => {
}
}));
}, 'groupId is correctly supported by getUserMedia() for video devices');
promise_test(t => {
return navigator.mediaDevices.enumerateDevices()
.then(t.step_func(async devices => {
for (var i in devices) {
await navigator.mediaDevices.getUserMedia(
{audio: {groupId: {exact: devices[i].groupId}}})
.then(
t.step_func(stream => {
var found_device = devices.find(element => {
return element.deviceId ==
stream.getTracks()[0].getSettings().deviceId;
});
assert_true(undefined !== found_device);
assert_equals(found_device.kind, "audioinput");
assert_equals(found_device.groupId, devices[i].groupId);
}),
t.step_func(error => {
assert_equals(error.name, "OverconstrainedError");
assert_equals(error.constraint, "groupId");
var found_device = devices.find(element => {
return element.kind == "audioinput" &&
element.groupId == devices[i].groupId});
assert_true(undefined === found_device);
}));
}
}));
}, 'groupId is correctly supported by getUserMedia() for audio devices');
</script>
</body>
</html>