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

Side by Side Diff: media/audio/audio_manager_unittest.cc

Issue 23453022: Add AudioManager::GetAudioOutputDeviceNames and implement for pulseaudio. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mediaCleanups
Patch Set: Add missing override. Created 7 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "media/audio/audio_manager.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 #if defined(USE_PULSEAUDIO)
11 #include "media/audio/pulse/audio_manager_pulse.h"
12 #endif
13
14 namespace media {
15
16 // TODO(joi): Remove guards once implemented for all platforms.
17 TEST(AudioManagerTest, GetAudioOutputDeviceNames) {
18 #if defined(USE_PULSEAUDIO)
19 scoped_ptr<AudioManager> audio_manager_pulse(AudioManagerPulse::Create());
20 if (!audio_manager_pulse)
21 return;
22
23 AudioDeviceNames device_names;
24 audio_manager_pulse->GetAudioOutputDeviceNames(&device_names);
25
26 VLOG(2) << "Got " << device_names.size() << " audio output devices.";
27 for (AudioDeviceNames::iterator it = device_names.begin();
28 it != device_names.end();
29 ++it) {
30 EXPECT_FALSE(it->unique_id.empty());
31 EXPECT_FALSE(it->device_name.empty());
32 VLOG(2) << "Device ID(" << it->unique_id << "), label: " << it->device_name;
33 }
34 #endif // defined(USE_PULSEAUDIO)
35 }
36
37 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698