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

Unified Diff: extensions/test/data/api_test/audio/add_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/add_nodes/background.js
diff --git a/extensions/test/data/api_test/audio/add_nodes/background.js b/extensions/test/data/api_test/audio/add_nodes/background.js
index 1acaf6639e8559ffb64080c5e80437ddadbad4f5..98e5054282ba8d822f0277cad03035ac40ede926 100644
--- a/extensions/test/data/api_test/audio/add_nodes/background.js
+++ b/extensions/test/data/api_test/audio/add_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: '30001',
+ stableId: hasStableId ? '116606' /* 80001 ^ 0xFFFF */ : '',
stableDeviceId: '80001',
isInput: false,
deviceType: 'USB',
@@ -27,6 +32,7 @@ chrome.test.runTests([
displayName: 'Jabra Speaker 1'
}, {
id: '30002',
+ stableId: hasStableId ? '116605' /* 80002 ^ 0xFFFF */ : '',
stableDeviceId: '80002',
isInput: false,
deviceType: 'USB',
@@ -34,6 +40,7 @@ chrome.test.runTests([
displayName: 'Jabra Speaker 2'
}, {
id: '30003',
+ stableId: hasStableId ? '116604' /* 80003 ^ 0xFFFF */ : '',
stableDeviceId: '80003',
isInput: false,
deviceType: 'HDMI',

Powered by Google App Engine
This is Rietveld 408576698