зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1455554 [wpt PR 10545] - Support the groupId property in MediaStreamTrack.getSettings(), a=testonly
Automatic update from web-platform-testsSupport the groupId property in MediaStreamTrack.getSettings() Bug: 834281 Change-Id: I5ef11a3343e5b534bee6e088a36fb3365bd218e8 Reviewed-on: https://chromium-review.googlesource.com/1019323 Commit-Queue: Guido Urdaneta <guidou@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Reviewed-by: Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/master@{#555759} -- wpt-commits: d3578ca763c561ab44f62405d02949183e2bdba7 wpt-pr: 10545
This commit is contained in:
Родитель
0955d1dabd
Коммит
cb35d68012
|
@ -582421,7 +582421,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mediacapture-streams/MediaStreamTrack-getSettings.https.html": [
|
||||
"013d31ba196d5a6f1506ceb8eab088e629dfd59b",
|
||||
"e73c53bfd0c77c91f2f736cb5bb723856c2d1501",
|
||||
"testharness"
|
||||
],
|
||||
"mediacapture-streams/MediaStreamTrack-id.https.html": [
|
||||
|
|
|
@ -57,4 +57,22 @@
|
|||
});
|
||||
});
|
||||
}, 'A device can be opened twice with different resolutions');
|
||||
|
||||
promise_test(t => {
|
||||
return navigator.mediaDevices.enumerateDevices().then(async devices => {
|
||||
for (var device of devices) {
|
||||
if (device.kind == "audiooutput")
|
||||
continue;
|
||||
var device_id_constraint = {deviceId: {exact: device.deviceId}};
|
||||
var constraints = device.kind == "audioinput"
|
||||
? {audio: device_id_constraint}
|
||||
: {video: device_id_constraint};
|
||||
|
||||
var stream = await navigator.mediaDevices.getUserMedia(constraints);
|
||||
assert_equals(stream.getTracks()[0].getSettings().groupId,
|
||||
device.groupId);
|
||||
assert_true(device.groupId.length > 0);
|
||||
}
|
||||
});
|
||||
}, 'groupId is correctly reported by getSettings() for all devices');
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче