OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "media/audio/linux/audio_manager_linux.h" | 7 #include "media/audio/linux/audio_manager_linux.h" |
8 #include "media/audio/linux/cras_output.h" | 8 #include "media/audio/linux/cras_output.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 MOCK_METHOD3(OnMoreData, uint32(uint8* dest, uint32 max_size, | 22 MOCK_METHOD3(OnMoreData, uint32(uint8* dest, uint32 max_size, |
23 AudioBuffersState buffers_state)); | 23 AudioBuffersState buffers_state)); |
24 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code)); | 24 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code)); |
25 }; | 25 }; |
26 | 26 |
27 class MockAudioManagerLinux : public AudioManagerLinux { | 27 class MockAudioManagerLinux : public AudioManagerLinux { |
28 public: | 28 public: |
29 MOCK_METHOD0(Init, void()); | 29 MOCK_METHOD0(Init, void()); |
30 MOCK_METHOD0(HasAudioOutputDevices, bool()); | 30 MOCK_METHOD0(HasAudioOutputDevices, bool()); |
31 MOCK_METHOD0(HasAudioInputDevices, bool()); | 31 MOCK_METHOD0(HasAudioInputDevices, bool()); |
32 MOCK_METHOD0(MuteAll, void()); | |
33 MOCK_METHOD0(UnMuteAll, void()); | |
34 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( | 32 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( |
35 const AudioParameters& params)); | 33 const AudioParameters& params)); |
36 MOCK_METHOD1(MakeLowLatencyOutputStream, AudioOutputStream*( | 34 MOCK_METHOD1(MakeLowLatencyOutputStream, AudioOutputStream*( |
37 const AudioParameters& params)); | 35 const AudioParameters& params)); |
38 MOCK_METHOD2(MakeLinearOutputStream, AudioInputStream*( | 36 MOCK_METHOD2(MakeLinearOutputStream, AudioInputStream*( |
39 const AudioParameters& params, const std::string& device_id)); | 37 const AudioParameters& params, const std::string& device_id)); |
40 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*( | 38 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*( |
41 const AudioParameters& params, const std::string& device_id)); | 39 const AudioParameters& params, const std::string& device_id)); |
42 | 40 |
43 // We need to override this function in order to skip the checking the number | 41 // We need to override this function in order to skip the checking the number |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 210 |
213 // Stop. | 211 // Stop. |
214 test_stream->Stop(); | 212 test_stream->Stop(); |
215 EXPECT_EQ(CrasOutputStream::kIsStopped, test_stream->state()); | 213 EXPECT_EQ(CrasOutputStream::kIsStopped, test_stream->state()); |
216 | 214 |
217 // Close the stream. | 215 // Close the stream. |
218 test_stream->Close(); | 216 test_stream->Close(); |
219 } | 217 } |
220 | 218 |
221 } // namespace media | 219 } // namespace media |
OLD | NEW |