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

Unified Diff: chromeos/audio/audio_devices_pref_handler_stub.cc

Issue 19861002: Add test coverage for CrasAudioHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more test cases. Created 7 years, 5 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: chromeos/audio/audio_devices_pref_handler_stub.cc
diff --git a/chromeos/audio/audio_devices_pref_handler_stub.cc b/chromeos/audio/audio_devices_pref_handler_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..51e57d90d7067976aa7efe206983744d2996f22a
--- /dev/null
+++ b/chromeos/audio/audio_devices_pref_handler_stub.cc
@@ -0,0 +1,54 @@
+// opyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/audio/audio_devices_pref_handler_stub.h"
+
+#include "chromeos/audio/audio_device.h"
+
+namespace chromeos {
+
+AudioDevicesPrefHandlerStub::AudioDevicesPrefHandlerStub() {
+}
+
+AudioDevicesPrefHandlerStub::~AudioDevicesPrefHandlerStub() {
+}
+
+double AudioDevicesPrefHandlerStub::GetVolumeGainValue(
+ const AudioDevice& device) {
+ return audio_device_volume_gain_map_[device.id];
+}
+
+void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice& device,
+ double value) {
+ audio_device_volume_gain_map_[device.id] = value;
+}
+
+bool AudioDevicesPrefHandlerStub::GetMuteValue(
+ const AudioDevice& device) {
+ return audio_device_mute_map_[device.id];
+}
+
+void AudioDevicesPrefHandlerStub::SetMuteValue(const AudioDevice& device,
+ bool mute_on) {
+ audio_device_mute_map_[device.id] = mute_on;
+}
+
+bool AudioDevicesPrefHandlerStub::GetAudioCaptureAllowedValue() {
+ return true;
+}
+
+bool AudioDevicesPrefHandlerStub::GetAudioOutputAllowedValue() {
+ return true;
+}
+
+void AudioDevicesPrefHandlerStub::AddAudioPrefObserver(
+ AudioPrefObserver* observer) {
+}
+
+void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver(
+ AudioPrefObserver* observer) {
+}
+
+} // namespace chromeos
+

Powered by Google App Engine
This is Rietveld 408576698