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

Side by Side Diff: content/browser/renderer_host/media/video_capture_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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 observer_binding_(this) {} 123 observer_binding_(this) {}
124 124
125 void SetUp() override { 125 void SetUp() override {
126 SetBrowserClientForTesting(&browser_client_); 126 SetBrowserClientForTesting(&browser_client_);
127 127
128 base::CommandLine::ForCurrentProcess()->AppendSwitch( 128 base::CommandLine::ForCurrentProcess()->AppendSwitch(
129 switches::kUseFakeDeviceForMediaStream); 129 switches::kUseFakeDeviceForMediaStream);
130 base::CommandLine::ForCurrentProcess()->AppendSwitch( 130 base::CommandLine::ForCurrentProcess()->AppendSwitch(
131 switches::kUseFakeUIForMediaStream); 131 switches::kUseFakeUIForMediaStream);
132 media_stream_manager_ = 132 media_stream_manager_ =
133 base::MakeUnique<MediaStreamManager>(audio_system_.get()); 133 MediaStreamManager::CreateWithDefaults(audio_system_.get());
134 134
135 // Create a Host and connect it to a simulated IPC channel. 135 // Create a Host and connect it to a simulated IPC channel.
136 host_.reset(new VideoCaptureHost(media_stream_manager_.get())); 136 host_.reset(new VideoCaptureHost(media_stream_manager_.get()));
137 137
138 OpenSession(); 138 OpenSession();
139 } 139 }
140 140
141 void TearDown() override { 141 void TearDown() override {
142 Mock::VerifyAndClearExpectations(host_.get()); 142 Mock::VerifyAndClearExpectations(host_.get());
143 EXPECT_TRUE(host_->controllers_.empty()); 143 EXPECT_TRUE(host_->controllers_.empty());
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 StartCapture(); 366 StartCapture();
367 367
368 // When the session is closed via the stream without stopping capture, the 368 // When the session is closed via the stream without stopping capture, the
369 // ENDED event is sent. 369 // ENDED event is sent.
370 EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::ENDED)); 370 EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::ENDED));
371 CloseSession(); 371 CloseSession();
372 base::RunLoop().RunUntilIdle(); 372 base::RunLoop().RunUntilIdle();
373 } 373 }
374 374
375 } // namespace content 375 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698