Chromium Code Reviews| Index: media/audio/audio_manager_unittest.cc |
| diff --git a/media/audio/audio_manager_unittest.cc b/media/audio/audio_manager_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e642bd12da66a5bb45acf9514c1d77c1580f2930 |
| --- /dev/null |
| +++ b/media/audio/audio_manager_unittest.cc |
| @@ -0,0 +1,34 @@ |
| +// Copyright 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 "base/logging.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "media/audio/audio_manager.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace media { |
| + |
| +class AudioManagerTest : public ::testing::Test { |
| + protected: |
| + AudioManagerTest() : audio_manager_(AudioManager::Create()) {} |
| + |
| + scoped_ptr<AudioManager> audio_manager_; |
| +}; |
| + |
| +// TODO(joi): Remove guards once implemented for all platforms. |
| +#if defined(USE_PULSEAUDIO) |
| +TEST_F(AudioManagerTest, GetAudioOutputDeviceNames) { |
|
tommi (sloooow) - chröme
2013/09/03 15:57:15
What about putting this with the audiomanagerbase
Jói
2013/09/04 09:11:04
There is no audio_manager_base_unittests.cc or any
tommi (sloooow) - chröme
2013/09/04 10:48:11
Sorry, what I was looking at were the platform spe
|
| + AudioDeviceNames device_names; |
| + audio_manager_->GetAudioOutputDeviceNames(&device_names); |
| + |
| + VLOG(2) << "Got " << device_names.size() << " audio output devices."; |
| + for (AudioDeviceNames::iterator it = device_names.begin(); |
| + it != device_names.end(); |
| + ++it) { |
| + VLOG(2) << "Device ID(" << it->unique_id << "), label: " << it->device_name; |
|
tommi (sloooow) - chröme
2013/09/03 15:57:15
expect neither to be empty?
Jói
2013/09/04 09:11:04
Done.
|
| + } |
| +} |
| +#endif // defined(USE_PULSEAUDIO) |
| + |
| +} // namespace media |