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 "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "media/audio/audio_output_dispatcher_impl.h" | 10 #include "media/audio/audio_output_dispatcher_impl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 MOCK_METHOD0(CanShowAudioInputSettings, bool()); | 64 MOCK_METHOD0(CanShowAudioInputSettings, bool()); |
65 MOCK_METHOD0(ShowAudioInputSettings, void()); | 65 MOCK_METHOD0(ShowAudioInputSettings, void()); |
66 MOCK_METHOD0(GetMessageLoop, scoped_refptr<base::MessageLoopProxy>()); | 66 MOCK_METHOD0(GetMessageLoop, scoped_refptr<base::MessageLoopProxy>()); |
67 MOCK_METHOD1(GetAudioInputDeviceNames, void( | 67 MOCK_METHOD1(GetAudioInputDeviceNames, void( |
68 media::AudioDeviceNames* device_name)); | 68 media::AudioDeviceNames* device_name)); |
69 MOCK_METHOD0(IsRecordingInProcess, bool()); | 69 MOCK_METHOD0(IsRecordingInProcess, bool()); |
70 }; | 70 }; |
71 | 71 |
72 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 72 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
73 public: | 73 public: |
74 MOCK_METHOD4(OnMoreData, uint32(AudioOutputStream* stream, | 74 MOCK_METHOD3(OnMoreData, uint32(uint8* dest, uint32 max_size, |
75 uint8* dest, uint32 max_size, | |
76 AudioBuffersState buffers_state)); | 75 AudioBuffersState buffers_state)); |
77 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code)); | 76 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code)); |
78 }; | 77 }; |
79 | 78 |
80 } // namespace | 79 } // namespace |
81 | 80 |
82 namespace media { | 81 namespace media { |
83 | 82 |
84 class AudioOutputProxyTest : public testing::Test { | 83 class AudioOutputProxyTest : public testing::Test { |
85 protected: | 84 protected: |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 550 |
552 proxy2->Start(&callback_); | 551 proxy2->Start(&callback_); |
553 | 552 |
554 Mock::VerifyAndClear(&callback_); | 553 Mock::VerifyAndClear(&callback_); |
555 | 554 |
556 proxy2->Close(); | 555 proxy2->Close(); |
557 WaitForCloseTimer(kTestCloseDelayMs); | 556 WaitForCloseTimer(kTestCloseDelayMs); |
558 } | 557 } |
559 | 558 |
560 } // namespace media | 559 } // namespace media |
OLD | NEW |