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

Unified Diff: media/audio/audio_low_latency_input_output_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_volume_unittest.cc ('k') | media/audio/audio_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_low_latency_input_output_unittest.cc
diff --git a/media/audio/audio_low_latency_input_output_unittest.cc b/media/audio/audio_low_latency_input_output_unittest.cc
index 7d8fc0a68ae1377a5b1a9fe5368f0c46710efc8a..26f9086c3be0fc46688fb377537a8e28a91181cd 100644
--- a/media/audio/audio_low_latency_input_output_unittest.cc
+++ b/media/audio/audio_low_latency_input_output_unittest.cc
@@ -13,6 +13,7 @@
#include "build/build_config.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager_base.h"
+#include "media/audio/audio_unittest_util.h"
#include "media/audio/fake_audio_log_factory.h"
#include "media/base/seekable_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -114,16 +115,6 @@ class AudioLowLatencyInputOutputTest : public testing::Test {
AudioManager* audio_manager() { return &mock_audio_manager_; }
base::MessageLoopForUI* message_loop() { return &message_loop_; }
- // Convenience method which ensures that we are not running on the build
- // bots and that at least one valid input and output device can be found.
- bool CanRunAudioTests() {
- bool input = audio_manager()->HasAudioInputDevices();
- bool output = audio_manager()->HasAudioOutputDevices();
- LOG_IF(WARNING, !input) << "No input device detected.";
- LOG_IF(WARNING, !output) << "No output device detected.";
- return input && output;
- }
-
private:
base::MessageLoopForUI message_loop_;
MockAudioManager mock_audio_manager_;
@@ -384,8 +375,8 @@ typedef StreamWrapper<AudioOutputStreamTraits> AudioOutputStreamWrapper;
// ylabel('delay [msec]')
// title('Full-duplex audio delay measurement');
TEST_F(AudioLowLatencyInputOutputTest, DISABLED_FullDuplexDelayMeasurement) {
- if (!CanRunAudioTests())
- return;
+ ABORT_AUDIO_TEST_IF_NOT(audio_manager()->HasAudioInputDevices() &&
+ audio_manager()->HasAudioOutputDevices());
AudioInputStreamWrapper aisw(audio_manager());
AudioInputStream* ais = aisw.Create();
« no previous file with comments | « media/audio/audio_input_volume_unittest.cc ('k') | media/audio/audio_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698