Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: third_party/WebKit/LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html

Issue 1416123005: Implement setSinkId() for media elements without src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More jochen's comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Audio Output Devices</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <audio id="testAudio"></audio>
10 <script>
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);
16
17 assert_idl_attribute(audio, 'setSinkId');
18 assert_equals(typeof audio.setSinkId, 'function');
19 assert_idl_attribute(audio, 'sinkId');
20 assert_equals(audio.sinkId, '');
21
22 return audio.setSinkId('').then(function() {
23 assert_equals(audio.sinkId, '');
24 return audio.setSinkId('xxx');
25 }, function(error) {
26 assert_unreached('setSinkId() should have succeeded!');
27 }). then(function() {
28 assert_unreached('setSinkId() should have failed!');
29 }, function(error) {
30 assert_equals(audio.sinkId, '');
31 return Promise.resolve();
32 })
33 }, 'setSinkId() test');
34 </script>
35 </body>
36 </html>
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698