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

Unified Diff: chrome/test/data/extensions/hangout_services_test.html

Issue 2471803002: Remove MediaStreamTrack.getSources(). (Closed)
Patch Set: Fix platform-specific expectations file Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/web_view/media_access/media_check_guest.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/hangout_services_test.html
diff --git a/chrome/test/data/extensions/hangout_services_test.html b/chrome/test/data/extensions/hangout_services_test.html
index ed1fcc57e422686fc584fc4b0a4cffecec00ef5c..8b9b9a73d6f9b3d6d13e382ac37066838f540bc3 100644
--- a/chrome/test/data/extensions/hangout_services_test.html
+++ b/chrome/test/data/extensions/hangout_services_test.html
@@ -20,7 +20,7 @@ the Hangout Services component extension and the APIs it uses.
// Populates UI elements with initial contents.
function populate() {
populateSinks();
- MediaStreamTrack.getSources(populateSources);
+ navigator.mediaDevices.enumerateDevices().then(populateSources);
}
// Populates the select box with information on all sinks and the
@@ -42,14 +42,14 @@ function populateSinks() {
});
}
-function populateSources(sources) {
+function populateSources(devices) {
var select = document.getElementById('selectSource');
- for (var i = 0; i < sources.length; ++i) {
- var source = sources[i];
- if (source.kind == 'audio') {
+ for (var i = 0; i < devices.length; ++i) {
+ var device = devices[i];
+ if (device.kind == 'audioinput') {
var option = document.createElement('option');
- option.value = source.id;
- option.text = source.label + ' (' + source.id + ')';
+ option.value = device.deviceId;
+ option.text = device.label + ' (' + device.deviceId + ')';
select.add(option);
}
}
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/web_view/media_access/media_check_guest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698