4 <title>Audio Output Devices
</title>
5 <script src=
"../../resources/testharness.js"></script>
6 <script src=
"../../resources/testharnessreport.js"></script>
9 <audio id=
"testAudio"></audio>
11 // Tests that the setSinkId() Promise rejects with a NotSupportedError,
12 // because the functionality has not been implemented yet.
13 promise_test(function() {
14 var audio
= document
.getElementById('testAudio');
15 assert_not_equals(audio
, null);
17 assert_idl_attribute(audio
, 'setSinkId');
18 assert_equals(typeof audio
.setSinkId
, 'function');
19 assert_idl_attribute(audio
, 'sinkId');
20 assert_equals(audio
.sinkId
, '');
22 return audio
.setSinkId('').then(function() {
23 assert_equals(audio
.sinkId
, '');
24 return audio
.setSinkId('xxx');
26 assert_unreached('setSinkId() should have succeeded!');
28 assert_unreached('setSinkId() should have failed!');
30 assert_equals(audio
.sinkId
, '');
31 return Promise
.resolve();
33 }, 'setSinkId() test');