3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
7 // Tests that the enumerateDevices() returns an array of at least
8 // one object with the correct fields
9 promise_test(function() {
10 assert_idl_attribute(navigator
, 'mediaDevices');
11 assert_idl_attribute(navigator
.mediaDevices
, 'enumerateDevices');
13 return navigator
.mediaDevices
.enumerateDevices().then(function(d
) {
14 assert_true(d
.length
> 0);
15 assert_idl_attribute(d
[0], 'kind');
16 assert_idl_attribute(d
[0], 'deviceId');
17 assert_idl_attribute(d
[0], 'label');
18 assert_idl_attribute(d
[0], 'groupId');
19 return Promise
.resolve();
21 }, 'enumerateDevices()');