OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |