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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 class MockAudioInputDeviceManagerListener | 26 class MockAudioInputDeviceManagerListener |
27 : public MediaStreamProviderListener { | 27 : public MediaStreamProviderListener { |
28 public: | 28 public: |
29 MockAudioInputDeviceManagerListener() {} | 29 MockAudioInputDeviceManagerListener() {} |
30 virtual ~MockAudioInputDeviceManagerListener() {} | 30 virtual ~MockAudioInputDeviceManagerListener() {} |
31 | 31 |
32 MOCK_METHOD2(Opened, void(MediaStreamType, const int)); | 32 MOCK_METHOD2(Opened, void(MediaStreamType, const int)); |
33 MOCK_METHOD2(Closed, void(MediaStreamType, const int)); | 33 MOCK_METHOD2(Closed, void(MediaStreamType, const int)); |
34 MOCK_METHOD2(DevicesEnumerated, void(MediaStreamType, | 34 MOCK_METHOD2(DevicesEnumerated, void(MediaStreamType, |
35 const StreamDeviceInfoArray&)); | 35 const StreamDeviceInfoArray&)); |
36 MOCK_METHOD3(Error, void(MediaStreamType, int, MediaStreamProviderError)); | 36 MOCK_METHOD2(Aborted, void(MediaStreamType, int)); |
37 | 37 |
38 StreamDeviceInfoArray devices_; | 38 StreamDeviceInfoArray devices_; |
39 | 39 |
40 private: | 40 private: |
41 DISALLOW_COPY_AND_ASSIGN(MockAudioInputDeviceManagerListener); | 41 DISALLOW_COPY_AND_ASSIGN(MockAudioInputDeviceManagerListener); |
42 }; | 42 }; |
43 | 43 |
44 // TODO(henrika): there are special restrictions for Android since | 44 // TODO(henrika): there are special restrictions for Android since |
45 // AudioInputDeviceManager::Open() must be called on the audio thread. | 45 // AudioInputDeviceManager::Open() must be called on the audio thread. |
46 // This test suite must be modified to run on Android. | 46 // This test suite must be modified to run on Android. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 DCHECK(!info); | 298 DCHECK(!info); |
299 | 299 |
300 manager_->Close(session_id); | 300 manager_->Close(session_id); |
301 EXPECT_CALL(*audio_input_listener_, | 301 EXPECT_CALL(*audio_input_listener_, |
302 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 302 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
303 .Times(1); | 303 .Times(1); |
304 message_loop_->RunUntilIdle(); | 304 message_loop_->RunUntilIdle(); |
305 } | 305 } |
306 | 306 |
307 } // namespace content | 307 } // namespace content |
OLD | NEW |