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

Unified Diff: extensions/test/data/api_test/audio/remove_nodes/background.js

Issue 2585413002: Update audio api to use v2 stable device ID (Closed)
Patch Set: Created 4 years 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: extensions/test/data/api_test/audio/remove_nodes/background.js
diff --git a/extensions/test/data/api_test/audio/remove_nodes/background.js b/extensions/test/data/api_test/audio/remove_nodes/background.js
index 2eb1e35d82e6cf110fabbd9837570023f9e1eb04..b55035b4f7592dd50fe7f3ee998a4c64cfc52cf6 100644
--- a/extensions/test/data/api_test/audio/remove_nodes/background.js
+++ b/extensions/test/data/api_test/audio/remove_nodes/background.js
@@ -8,6 +8,7 @@ chrome.test.runTests([
var deviceList = devices.map(function(device) {
return {
id: device.id,
+ stableId: device.stableId,
stableDeviceId: device.stableDeviceId,
isInput: device.isInput,
deviceType: device.deviceType,
@@ -18,8 +19,12 @@ chrome.test.runTests([
return Number.parseInt(lhs.id) - Number.parseInt(rhs.id);
});
+ chrome.test.assertTrue(devices.length > 0);
+ var hasStableId = !!devices[0].stableId;
+
chrome.test.assertEq([{
id: '40001',
+ stableId: hasStableId ? '106606' /* 90001 ^ 0xFFFF */ : '',
stableDeviceId: '90001',
isInput: true,
deviceType: 'USB',
@@ -27,6 +32,7 @@ chrome.test.runTests([
displayName: 'Jabra Mic 1'
}, {
id: '40002',
+ stableId: hasStableId ? '106605' /* 90002 ^ 0xFFFF */ : '',
stableDeviceId: '90002',
isInput: true,
deviceType: 'USB',

Powered by Google App Engine
This is Rietveld 408576698