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

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

Issue 945103002: Add a new audio extension event OnLevelChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: extensions/test/data/api_test/audio/volume_change/background.js
diff --git a/extensions/test/data/api_test/usb/add_event/background.js b/extensions/test/data/api_test/audio/volume_change/background.js
similarity index 56%
copy from extensions/test/data/api_test/usb/add_event/background.js
copy to extensions/test/data/api_test/audio/volume_change/background.js
index 1f8382a8e81a7bd4232a93667fe3747efd85f00e..44a17c49042b680437dfdc35c5dfabda3c2941bf 100644
--- a/extensions/test/data/api_test/usb/add_event/background.js
+++ b/extensions/test/data/api_test/audio/volume_change/background.js
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-chrome.usb.onDeviceAdded.addListener(function(device) {
- if (device.vendorId == 6353 && device.productId == 22768) {
+chrome.audio.OnOutputNodeVolumeChanged.addListener(function (id, volume) {
+ if (id == 30001 && volume == 60) {
chrome.test.sendMessage("success");
} else {
- console.error("Got unexpected device: vid:" + device.vendorId +
- " pid:" + device.productId);
+ console.error("Got unexpected OnOutputNodeVolumeChanged event id:" + id +
+ " volume:" + volume);
chrome.test.sendMessage("failure");
}
});

Powered by Google App Engine
This is Rietveld 408576698