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

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

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 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/cras/audio_manager_cras.cc ('k') | media/audio/fake_audio_log_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/audio/cras/audio_manager_cras.h" 10 #include "media/audio/cras/audio_manager_cras.h"
(...skipping 19 matching lines...) Expand all
30 30
31 class MockAudioManagerCras : public AudioManagerCras { 31 class MockAudioManagerCras : public AudioManagerCras {
32 public: 32 public:
33 MockAudioManagerCras() : AudioManagerCras(&fake_audio_log_factory_) {} 33 MockAudioManagerCras() : AudioManagerCras(&fake_audio_log_factory_) {}
34 34
35 MOCK_METHOD0(Init, void()); 35 MOCK_METHOD0(Init, void());
36 MOCK_METHOD0(HasAudioOutputDevices, bool()); 36 MOCK_METHOD0(HasAudioOutputDevices, bool());
37 MOCK_METHOD0(HasAudioInputDevices, bool()); 37 MOCK_METHOD0(HasAudioInputDevices, bool());
38 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( 38 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*(
39 const AudioParameters& params)); 39 const AudioParameters& params));
40 MOCK_METHOD3(MakeLowLatencyOutputStream, 40 MOCK_METHOD2(MakeLowLatencyOutputStream,
41 AudioOutputStream*(const AudioParameters& params, 41 AudioOutputStream*(const AudioParameters& params,
42 const std::string& device_id, 42 const std::string& device_id));
43 const std::string& input_device_id));
44 MOCK_METHOD2(MakeLinearOutputStream, AudioInputStream*( 43 MOCK_METHOD2(MakeLinearOutputStream, AudioInputStream*(
45 const AudioParameters& params, const std::string& device_id)); 44 const AudioParameters& params, const std::string& device_id));
46 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*( 45 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*(
47 const AudioParameters& params, const std::string& device_id)); 46 const AudioParameters& params, const std::string& device_id));
48 47
49 // We need to override this function in order to skip the checking the number 48 // We need to override this function in order to skip the checking the number
50 // of active output streams. It is because the number of active streams 49 // of active output streams. It is because the number of active streams
51 // is managed inside MakeAudioOutputStream, and we don't use 50 // is managed inside MakeAudioOutputStream, and we don't use
52 // MakeAudioOutputStream to create the stream in the tests. 51 // MakeAudioOutputStream to create the stream in the tests.
53 virtual void ReleaseOutputStream(AudioOutputStream* stream) OVERRIDE { 52 virtual void ReleaseOutputStream(AudioOutputStream* stream) OVERRIDE {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 151
153 // Wait for samples to be captured. 152 // Wait for samples to be captured.
154 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout())); 153 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout()));
155 154
156 test_stream->Stop(); 155 test_stream->Stop();
157 156
158 test_stream->Close(); 157 test_stream->Close();
159 } 158 }
160 159
161 } // namespace media 160 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/cras/audio_manager_cras.cc ('k') | media/audio/fake_audio_log_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698