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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "media/audio/audio_output_dispatcher_impl.h" | 10 #include "media/audio/audio_output_dispatcher_impl.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 private: | 89 private: |
90 bool start_called_; | 90 bool start_called_; |
91 bool stop_called_; | 91 bool stop_called_; |
92 AudioParameters params_; | 92 AudioParameters params_; |
93 scoped_ptr<AudioOutputStream> fake_output_stream_; | 93 scoped_ptr<AudioOutputStream> fake_output_stream_; |
94 }; | 94 }; |
95 | 95 |
96 class MockAudioManager : public AudioManagerBase { | 96 class MockAudioManager : public AudioManagerBase { |
97 public: | 97 public: |
98 MockAudioManager() {} | 98 MockAudioManager() {} |
| 99 virtual ~MockAudioManager() { |
| 100 Shutdown(); |
| 101 } |
99 | 102 |
100 MOCK_METHOD0(Init, void()); | |
101 MOCK_METHOD0(HasAudioOutputDevices, bool()); | 103 MOCK_METHOD0(HasAudioOutputDevices, bool()); |
102 MOCK_METHOD0(HasAudioInputDevices, bool()); | 104 MOCK_METHOD0(HasAudioInputDevices, bool()); |
103 MOCK_METHOD0(GetAudioInputDeviceModel, string16()); | 105 MOCK_METHOD0(GetAudioInputDeviceModel, string16()); |
104 MOCK_METHOD1(MakeAudioOutputStream, AudioOutputStream*( | 106 MOCK_METHOD1(MakeAudioOutputStream, AudioOutputStream*( |
105 const AudioParameters& params)); | 107 const AudioParameters& params)); |
106 MOCK_METHOD1(MakeAudioOutputStreamProxy, AudioOutputStream*( | 108 MOCK_METHOD1(MakeAudioOutputStreamProxy, AudioOutputStream*( |
107 const AudioParameters& params)); | 109 const AudioParameters& params)); |
108 MOCK_METHOD2(MakeAudioInputStream, AudioInputStream*( | 110 MOCK_METHOD2(MakeAudioInputStream, AudioInputStream*( |
109 const AudioParameters& params, const std::string& device_id)); | 111 const AudioParameters& params, const std::string& device_id)); |
110 MOCK_METHOD0(CanShowAudioInputSettings, bool()); | 112 MOCK_METHOD0(CanShowAudioInputSettings, bool()); |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 WaitForCloseTimer(kTestCloseDelayMs); | 891 WaitForCloseTimer(kTestCloseDelayMs); |
890 EXPECT_TRUE(stream1.stop_called()); | 892 EXPECT_TRUE(stream1.stop_called()); |
891 EXPECT_TRUE(stream1.start_called()); | 893 EXPECT_TRUE(stream1.start_called()); |
892 EXPECT_TRUE(stream2.stop_called()); | 894 EXPECT_TRUE(stream2.stop_called()); |
893 EXPECT_TRUE(stream2.start_called()); | 895 EXPECT_TRUE(stream2.start_called()); |
894 EXPECT_FALSE(stream3.stop_called()); | 896 EXPECT_FALSE(stream3.stop_called()); |
895 EXPECT_FALSE(stream3.start_called()); | 897 EXPECT_FALSE(stream3.start_called()); |
896 } | 898 } |
897 | 899 |
898 } // namespace media | 900 } // namespace media |
OLD | NEW |