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

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

Issue 7060011: Adding GetAudioInputDeviceNames to AudioManager, this function is supposed to do device enumerati... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 // Test that devices can be enumerated.
awong 2011/05/23 21:17:58 I'm going to be a bit picky about this. The comme
11 TEST(AudioInputDeviceTest, EnumerateDevices) {
12 AudioDeviceNames device_names;
13 ASSERT_TRUE(AudioManager::GetAudioManager() != NULL);
14 AudioManager::GetAudioManager()->GetAudioInputDeviceNames(&device_names);
15 if (!device_names.empty()) {
16 AudioDeviceNames::const_iterator it = device_names.begin();
17 // The first device in the list is the prepended default device.
18 EXPECT_EQ("Default", it->device_name);
19 EXPECT_EQ("Default_0", it->unique_id);
20 ++it;
21
22 // Other devices should have non-empty name and id.
23 while (it != device_names.end()) {
24 EXPECT_EQ("", it->device_name);
25 EXPECT_EQ("", it->unique_id);
26 ++it;
27 }
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698