Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc

Issue 2763383002: Switching AudioInputDeviceManager from using AudioManager interface to AudioSystem one. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698