| 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 <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "media/audio/audio_io.h" | 9 #include "media/audio/audio_io.h" |
| 10 #include "media/audio/audio_manager_base.h" | 10 #include "media/audio/audio_manager_base.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 return ais; | 90 return ais; |
| 91 } | 91 } |
| 92 | 92 |
| 93 scoped_ptr<AudioManager> audio_manager_; | 93 scoped_ptr<AudioManager> audio_manager_; |
| 94 | 94 |
| 95 #if defined(OS_WIN) | 95 #if defined(OS_WIN) |
| 96 base::win::ScopedCOMInitializer com_init_; | 96 base::win::ScopedCOMInitializer com_init_; |
| 97 #endif | 97 #endif |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 100 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 101 // Currently failing on linux ARM bot: http://crbug/238490 | 101 // Currently failing on linux ARM bot: http://crbug/238490 |
| 102 // Also flaky on x86_64: http://crbug/236936 |
| 102 #define MAYBE_InputVolumeTest DISABLED_InputVolumeTest | 103 #define MAYBE_InputVolumeTest DISABLED_InputVolumeTest |
| 103 #else | 104 #else |
| 104 #define MAYBE_InputVolumeTest InputVolumeTest | 105 #define MAYBE_InputVolumeTest InputVolumeTest |
| 105 #endif | 106 #endif |
| 106 | 107 |
| 107 TEST_F(AudioInputVolumeTest, MAYBE_InputVolumeTest) { | 108 TEST_F(AudioInputVolumeTest, MAYBE_InputVolumeTest) { |
| 108 if (!CanRunAudioTests()) | 109 if (!CanRunAudioTests()) |
| 109 return; | 110 return; |
| 110 | 111 |
| 111 // Retrieve a list of all available input devices. | 112 // Retrieve a list of all available input devices. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // Restores the volume to the original value. | 176 // Restores the volume to the original value. |
| 176 ais->SetVolume(original_volume); | 177 ais->SetVolume(original_volume); |
| 177 current_volume = ais->GetVolume(); | 178 current_volume = ais->GetVolume(); |
| 178 EXPECT_EQ(original_volume, current_volume); | 179 EXPECT_EQ(original_volume, current_volume); |
| 179 | 180 |
| 180 ais->Close(); | 181 ais->Close(); |
| 181 } | 182 } |
| 182 } | 183 } |
| 183 | 184 |
| 184 } // namespace media | 185 } // namespace media |
| OLD | NEW |