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

Side by Side Diff: media/audio/audio_unittest_util.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
« no previous file with comments | « media/audio/audio_unittest_util.h ('k') | media/audio/mac/audio_auhal_mac_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/audio/audio_unittest_util.h"
6
7 #include "base/command_line.h"
8 #include "base/logging.h"
9 #include "media/base/media_switches.h"
10
11 namespace media {
12
13 // For macro ABORT_AUDIO_TEST_IF_NOT.
14 bool ShouldAbortAudioTest(bool requirements_satisfied,
15 const char* requirements_expression,
16 bool* should_fail) {
17 bool fail_if_unsatisfied = base::CommandLine::ForCurrentProcess()->HasSwitch(
18 switches::kRequireAudioHardwareForTesting);
19 if (!requirements_satisfied) {
20 LOG(WARNING) << "Requirement(s) not satisfied (" << requirements_expression
21 << ")";
22 *should_fail = fail_if_unsatisfied;
23 return true;
24 }
25 *should_fail = false;
26 return false;
27 }
28
29 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_unittest_util.h ('k') | media/audio/mac/audio_auhal_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698