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

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

Issue 2787703004: [Mojo Video Capture] Fix VideoCaptureManager exposing implementation details to clients (Closed)
Patch Set: Pull changes from upstream Created 3 years, 8 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ = 245 media_stream_manager_ =
246 base::MakeUnique<MediaStreamManager>(audio_system_.get()); 246 MediaStreamManager::CreateWithDefaults(audio_system_.get());
247 host_ = new MockAudioRendererHost( 247 host_ = new MockAudioRendererHost(
248 &auth_run_loop_, render_process_host_.GetID(), audio_manager_.get(), 248 &auth_run_loop_, render_process_host_.GetID(), audio_manager_.get(),
249 audio_system_.get(), &mirroring_manager_, media_stream_manager_.get(), 249 audio_system_.get(), &mirroring_manager_, media_stream_manager_.get(),
250 kSalt); 250 kSalt);
251 251
252 // Simulate IPC channel connected. 252 // Simulate IPC channel connected.
253 host_->set_peer_process_for_testing(base::Process::Current()); 253 host_->set_peer_process_for_testing(base::Process::Current());
254 } 254 }
255 255
256 ~AudioRendererHostTest() override { 256 ~AudioRendererHostTest() override {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 623 }
624 624
625 TEST_F(AudioRendererHostTest, CreateFailsForInvalidRenderFrame) { 625 TEST_F(AudioRendererHostTest, CreateFailsForInvalidRenderFrame) {
626 CreateWithInvalidRenderFrameId(); 626 CreateWithInvalidRenderFrameId();
627 Close(); 627 Close();
628 } 628 }
629 629
630 // TODO(hclam): Add tests for data conversation in low latency mode. 630 // TODO(hclam): Add tests for data conversation in low latency mode.
631 631
632 } // namespace content 632 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698