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

Unified Diff: media/audio/audio_input_volume_unittest.cc

Issue 914483002: Add flag --require-audio-hardware-for-testing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_volume_unittest.cc
diff --git a/media/audio/audio_input_volume_unittest.cc b/media/audio/audio_input_volume_unittest.cc
index a2213a3e92be7306f5d76a4c1aebdceb397f15ac..d6ee313bc250a6ede92bc0b95f90598aa3386061 100644
--- a/media/audio/audio_input_volume_unittest.cc
+++ b/media/audio/audio_input_volume_unittest.cc
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager_base.h"
+#include "media/audio/audio_unittest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_WIN)
@@ -45,17 +46,12 @@ class AudioInputVolumeTest : public ::testing::Test {
{
}
- bool CanRunAudioTests() {
+ bool HasCoreAudioAndInputDevices() {
#if defined(OS_WIN)
// TODO(henrika): add support for volume control on Windows XP as well.
- // For now, we might as well signal false already here to avoid running
- // these tests on Windows XP.
if (!CoreAudioUtil::IsSupported())
return false;
#endif
- if (!audio_manager_)
- return false;
-
return audio_manager_->HasAudioInputDevices();
}
@@ -106,8 +102,7 @@ class AudioInputVolumeTest : public ::testing::Test {
#endif
TEST_F(AudioInputVolumeTest, MAYBE_InputVolumeTest) {
- if (!CanRunAudioTests())
- return;
+ ABORT_AUDIO_TEST_IF_NOT(HasCoreAudioAndInputDevices());
// Retrieve a list of all available input devices.
AudioDeviceNames device_names;
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698