OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 base::Unretained(&id))); | 310 base::Unretained(&id))); |
311 base::RunLoop().RunUntilIdle(); | 311 base::RunLoop().RunUntilIdle(); |
312 return id; | 312 return id; |
313 } | 313 } |
314 | 314 |
315 media::FakeAudioLogFactory log_factory_; | 315 media::FakeAudioLogFactory log_factory_; |
316 StrictMock<MockControllerFactory> controller_factory_; | 316 StrictMock<MockControllerFactory> controller_factory_; |
317 std::unique_ptr<MediaStreamManager> media_stream_manager_; | 317 std::unique_ptr<MediaStreamManager> media_stream_manager_; |
318 TestBrowserThreadBundle thread_bundle_; | 318 TestBrowserThreadBundle thread_bundle_; |
319 media::ScopedAudioManagerPtr audio_manager_; | 319 media::ScopedAudioManagerPtr audio_manager_; |
320 std::unique_ptr<media::AudioSystem> audio_system_; | 320 media::AudioSystem::UniquePtr audio_system_; |
321 StrictMock<MockRenderer> renderer_; | 321 StrictMock<MockRenderer> renderer_; |
322 scoped_refptr<AudioInputRendererHost> airh_; | 322 scoped_refptr<AudioInputRendererHost> airh_; |
323 | 323 |
324 private: | 324 private: |
325 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHostTest); | 325 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHostTest); |
326 }; | 326 }; |
327 | 327 |
328 // Checks that a controller is created and a reply is sent when creating a | 328 // Checks that a controller is created and a reply is sent when creating a |
329 // stream. | 329 // stream. |
330 TEST_F(AudioInputRendererHostTest, CreateWithDefaultDevice) { | 330 TEST_F(AudioInputRendererHostTest, CreateWithDefaultDevice) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 EXPECT_CALL(controller_factory_, ControllerCreated()); | 558 EXPECT_CALL(controller_factory_, ControllerCreated()); |
559 | 559 |
560 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( | 560 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( |
561 kStreamId, kRenderFrameId, session_id, DefaultConfig())); | 561 kStreamId, kRenderFrameId, session_id, DefaultConfig())); |
562 base::RunLoop().RunUntilIdle(); | 562 base::RunLoop().RunUntilIdle(); |
563 | 563 |
564 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); | 564 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); |
565 } | 565 } |
566 | 566 |
567 } // namespace content | 567 } // namespace content |
OLD | NEW |