| 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 "content/browser/renderer_host/media/audio_input_device_manager.h" | 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 base::RunLoop().RunUntilIdle(); | 83 base::RunLoop().RunUntilIdle(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void TearDown() override { | 86 void TearDown() override { |
| 87 manager_->UnregisterListener(audio_input_listener_.get()); | 87 manager_->UnregisterListener(audio_input_listener_.get()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 TestBrowserThreadBundle thread_bundle_; | 90 TestBrowserThreadBundle thread_bundle_; |
| 91 scoped_refptr<AudioInputDeviceManager> manager_; | 91 scoped_refptr<AudioInputDeviceManager> manager_; |
| 92 std::unique_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_; | 92 std::unique_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_; |
| 93 media::ScopedAudioManagerPtr audio_manager_; | 93 std::unique_ptr<media::AudioManager> audio_manager_; |
| 94 StreamDeviceInfoArray devices_; | 94 StreamDeviceInfoArray devices_; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(MAYBE_AudioInputDeviceManagerTest); | 97 DISALLOW_COPY_AND_ASSIGN(MAYBE_AudioInputDeviceManagerTest); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 // Opens and closes the devices. | 100 // Opens and closes the devices. |
| 101 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenAndCloseDevice) { | 101 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenAndCloseDevice) { |
| 102 ASSERT_FALSE(devices_.empty()); | 102 ASSERT_FALSE(devices_.empty()); |
| 103 | 103 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 DCHECK(!info); | 272 DCHECK(!info); |
| 273 | 273 |
| 274 manager_->Close(session_id); | 274 manager_->Close(session_id); |
| 275 EXPECT_CALL(*audio_input_listener_, | 275 EXPECT_CALL(*audio_input_listener_, |
| 276 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 276 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
| 277 .Times(1); | 277 .Times(1); |
| 278 base::RunLoop().RunUntilIdle(); | 278 base::RunLoop().RunUntilIdle(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace content | 281 } // namespace content |
| OLD | NEW |