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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html

Issue 2645613005: MediaStreamTrack: Add echo-cancellation and device-id to getSettings (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html b/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html
index 424cd3c4ed2c2fc4e4435624212cdab68881b72e..63839964b37f82b2f6704513fc477844d4c9e3ff 100644
--- a/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html
+++ b/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html
@@ -20,10 +20,24 @@ promise_test(function() {
}, 'A video track returns settings');
promise_test(function() {
+ return navigator.mediaDevices.getUserMedia({audio: true})
+ .then(function(s) {
+ settings = s.getAudioTracks()[0].getSettings();
+ assert_greater_than(Object.keys(settings).length, 0);
+ assert_true('deviceId' in settings,
+ 'Device ID missing: ' + JSON.stringify(settings));
+ assert_true('echoCancellation' in settings,
+ 'echoCancellation missing: ' + JSON.stringify(settings));
+ });
+}, 'An audio track returns the expected variables');
+
+promise_test(function() {
return navigator.mediaDevices.getUserMedia({video: true})
.then(function(s) {
settings = s.getVideoTracks()[0].getSettings();
assert_greater_than(Object.keys(settings).length, 0);
+ assert_true('deviceId' in settings,
+ 'Device ID missing: ' + JSON.stringify(settings));
assert_true('frameRate' in settings,
'Frame rate missing: ' + JSON.stringify(settings));
assert_true('width' in settings,
@@ -31,6 +45,15 @@ promise_test(function() {
assert_true('height' in settings,
'Height missing: ' + JSON.stringify(settings));
});
-}, 'A video track returns frame rate');
+}, 'A video track returns the expected variables');
+promise_test(function() {
+ return navigator.mediaDevices.getUserMedia({audio: true, video: true})
+ .then(function(s) {
+ videoSettings = s.getVideoTracks()[0].getSettings();
+ audioSettings = s.getAudioTracks()[0].getSettings();
+ assert_not_equals(videoSettings.deviceId, audioSettings.deviceId,
+ 'video and audio device IDs should be different')
+ });
+}, 'Video and audio device IDs are different');
</script>

Powered by Google App Engine
This is Rietveld 408576698