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

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

Issue 2697033006: Switching MediaStreamManager from using AudioManager to AudioSystem (Closed)
Patch Set: weak pointers removed 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 (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_renderer_host.h" 5 #include "content/browser/renderer_host/media/audio_renderer_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 public: 235 public:
236 AudioRendererHostTest() 236 AudioRendererHostTest()
237 : log_factory(base::MakeUnique<media::FakeAudioLogFactory>()), 237 : log_factory(base::MakeUnique<media::FakeAudioLogFactory>()),
238 audio_manager_(base::MakeUnique<FakeAudioManagerWithAssociations>( 238 audio_manager_(base::MakeUnique<FakeAudioManagerWithAssociations>(
239 base::ThreadTaskRunnerHandle::Get(), 239 base::ThreadTaskRunnerHandle::Get(),
240 log_factory.get())), 240 log_factory.get())),
241 audio_system_(media::AudioSystemImpl::Create(audio_manager_.get())), 241 audio_system_(media::AudioSystemImpl::Create(audio_manager_.get())),
242 render_process_host_(&browser_context_, &auth_run_loop_) { 242 render_process_host_(&browser_context_, &auth_run_loop_) {
243 base::CommandLine::ForCurrentProcess()->AppendSwitch( 243 base::CommandLine::ForCurrentProcess()->AppendSwitch(
244 switches::kUseFakeDeviceForMediaStream); 244 switches::kUseFakeDeviceForMediaStream);
245 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); 245 media_stream_manager_ =
246 base::MakeUnique<MediaStreamManager>(audio_system_.get());
246 host_ = new MockAudioRendererHost( 247 host_ = new MockAudioRendererHost(
247 &auth_run_loop_, render_process_host_.GetID(), audio_manager_.get(), 248 &auth_run_loop_, render_process_host_.GetID(), audio_manager_.get(),
248 audio_system_.get(), &mirroring_manager_, media_stream_manager_.get(), 249 audio_system_.get(), &mirroring_manager_, media_stream_manager_.get(),
249 kSalt); 250 kSalt);
250 251
251 // Simulate IPC channel connected. 252 // Simulate IPC channel connected.
252 host_->set_peer_process_for_testing(base::Process::Current()); 253 host_->set_peer_process_for_testing(base::Process::Current());
253 } 254 }
254 255
255 ~AudioRendererHostTest() override { 256 ~AudioRendererHostTest() override {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 623 }
623 624
624 TEST_F(AudioRendererHostTest, CreateFailsForInvalidRenderFrame) { 625 TEST_F(AudioRendererHostTest, CreateFailsForInvalidRenderFrame) {
625 CreateWithInvalidRenderFrameId(); 626 CreateWithInvalidRenderFrameId();
626 Close(); 627 Close();
627 } 628 }
628 629
629 // TODO(hclam): Add tests for data conversation in low latency mode. 630 // TODO(hclam): Add tests for data conversation in low latency mode.
630 631
631 } // namespace content 632 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698