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

Side by Side Diff: media/audio/audio_unittest_utils.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 unified diff | Download patch
OLDNEW
(Empty)
1 #include "base/command_line.h"
DaleCurtis 2015/02/09 22:10:49 Needs license header.
watk 2015/02/10 01:38:33 Done.
2 #include "base/logging.h"
3 #include "media/base/media_switches.h"
4
5 // For macro ABORT_AUDIO_TEST_IF_NOT.
6 bool should_abort_audio_test(bool requirements_satisfied,
7 const char* requirements_expression,
8 bool* should_fail) {
9 bool fail_if_unsatisfied = base::CommandLine::ForCurrentProcess()->HasSwitch(
10 switches::kRequireAudioHardwareForTesting);
11 if (!requirements_satisfied) {
12 LOG(WARNING) << "Requirement(s) not satisfied (" << requirements_expression
13 << ")";
14 *should_fail = fail_if_unsatisfied;
DaleCurtis 2015/02/09 22:10:49 Should always be set?
watk 2015/02/10 01:38:33 May as well
15 return true;
16 }
17 return false;
18 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698