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

Unified Diff: LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html

Issue 1188203002: Implementation of setSinkId() for HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add guidou as owner Created 5 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html
diff --git a/LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html b/LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html
index 727b7e42176c7497630d496de089140f2d665601..204ff8f7ec920364a0030471f7b6bf36d6e571df 100644
--- a/LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html
+++ b/LayoutTests/media/audio_output_devices/audio_output_devices-setsinkid.html
@@ -6,25 +6,30 @@
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
- <video id="testVideo"></video>
+ <audio id="testAudio"></audio>
<script>
// Tests that the setSinkId() Promise rejects with a NotSupportedError,
// because the functionality has not been implemented yet.
promise_test(function() {
- var video = document.getElementById('testVideo');
- assert_not_equals(video, null);
+ var audio = document.getElementById('testAudio');
+ assert_not_equals(audio, null);
- assert_idl_attribute(video, 'setSinkId');
- assert_equals(typeof video.setSinkId, 'function');
- assert_idl_attribute(video, 'sinkId');
- assert_equals(video.sinkId, '');
+ assert_idl_attribute(audio, 'setSinkId');
+ assert_equals(typeof audio.setSinkId, 'function');
+ assert_idl_attribute(audio, 'sinkId');
+ assert_equals(audio.sinkId, '');
- return video.setSinkId('').then(function() {
- assert_unreached('setSinkId() should not be implemented yet!');
+ return audio.setSinkId('').then(function() {
+ assert_equals(audio.sinkId, '');
+ return audio.setSinkId('xxx');
}, function(error) {
- assert_equals(error.name, 'NotSupportedError');
+ assert_unreached('setSinkId() should have succeeded!');
+ }). then(function() {
+ assert_unreached('setSinkId() should have failed!');
+ }, function(error) {
+ assert_equals(audio.sinkId, '');
return Promise.resolve();
- });
+ })
}, 'setSinkId() test');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698