OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/environment.h" | 5 #include "base/environment.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/win/scoped_com_initializer.h" | 7 #include "base/win/scoped_com_initializer.h" |
8 #include "media/audio/audio_manager.h" | 8 #include "media/audio/audio_manager.h" |
9 #include "media/audio/audio_manager_base.h" | 9 #include "media/audio/audio_manager_base.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 #include "media/audio/win/audio_manager_win.h" | 13 #include "media/audio/win/audio_manager_win.h" |
14 #include "media/audio/win/wavein_input_win.h" | 14 #include "media/audio/win/wavein_input_win.h" |
15 #endif | 15 #endif |
16 | 16 |
17 using base::win::ScopedCOMInitializer; | 17 using base::win::ScopedCOMInitializer; |
18 | 18 using media::AudioDeviceNames; |
19 namespace media { | |
20 | 19 |
21 // Test fixture which allows us to override the default enumeration API on | 20 // Test fixture which allows us to override the default enumeration API on |
22 // Windows. | 21 // Windows. |
23 class AudioInputDeviceTest | 22 class AudioInputDeviceTest |
24 : public ::testing::Test { | 23 : public ::testing::Test { |
25 protected: | 24 protected: |
26 AudioInputDeviceTest() | 25 AudioInputDeviceTest() |
27 : audio_manager_(AudioManager::Create()), | 26 : audio_manager_(AudioManager::Create()), |
28 com_init_(ScopedCOMInitializer::kMTA) { | 27 com_init_(ScopedCOMInitializer::kMTA) { |
29 } | 28 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 EXPECT_EQ(i->unique_id, converted_id); | 164 EXPECT_EQ(i->unique_id, converted_id); |
166 } else { | 165 } else { |
167 // MMDevice-style device IDs should be converted to WaveIn-style device | 166 // MMDevice-style device IDs should be converted to WaveIn-style device |
168 // IDs. | 167 // IDs. |
169 EXPECT_NE(i->unique_id, converted_id); | 168 EXPECT_NE(i->unique_id, converted_id); |
170 } | 169 } |
171 } | 170 } |
172 } | 171 } |
173 | 172 |
174 #endif | 173 #endif |
175 | |
176 } // namespace media | |
OLD | NEW |