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

Side by Side Diff: media/audio/cras/cras_input_unittest.cc

Issue 132773002: Fix chromeos=1 so Pulse is preferred when use_cras=0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove alsa_util.h dependency. Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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 <unistd.h>
6
7 #include <string> 5 #include <string>
8 6
9 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
10 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
11 #include "base/time/time.h" 9 #include "base/time/time.h"
12 #include "media/audio/cras/audio_manager_cras.h" 10 #include "media/audio/cras/audio_manager_cras.h"
13 #include "media/audio/cras/cras_input.h"
14 #include "media/audio/fake_audio_log_factory.h" 11 #include "media/audio/fake_audio_log_factory.h"
15 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
17 14
15 // cras_util.h defines custom min/max macros which break compilation, so ensure
16 // it's not included until last. #if avoids presubmit errors.
17 #if defined(USE_CRAS)
18 #include "media/audio/cras/cras_input.h"
19 #endif
dgreid 2014/01/10 19:56:25 This works, we should probably wrap the defines in
DaleCurtis 2014/01/10 20:00:18 Agreed, this isn't first time this issue has cropp
20
18 using testing::_; 21 using testing::_;
19 using testing::AtLeast; 22 using testing::AtLeast;
20 using testing::Ge; 23 using testing::Ge;
21 using testing::InvokeWithoutArgs; 24 using testing::InvokeWithoutArgs;
22 using testing::StrictMock; 25 using testing::StrictMock;
23 26
24 namespace media { 27 namespace media {
25 28
26 class MockAudioInputCallback : public AudioInputStream::AudioInputCallback { 29 class MockAudioInputCallback : public AudioInputStream::AudioInputCallback {
27 public: 30 public:
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 AudioParameters params_stereo(kTestFormat, 211 AudioParameters params_stereo(kTestFormat,
209 CHANNEL_LAYOUT_STEREO, 212 CHANNEL_LAYOUT_STEREO,
210 rates[i], 213 rates[i],
211 kTestBitsPerSample, 214 kTestBitsPerSample,
212 kTestFramesPerPacket); 215 kTestFramesPerPacket);
213 CaptureSomeFrames(params_stereo, kTestCaptureDurationMs); 216 CaptureSomeFrames(params_stereo, kTestCaptureDurationMs);
214 } 217 }
215 } 218 }
216 219
217 } // namespace media 220 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698