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

Unified Diff: content/browser/renderer_host/media/video_capture_manager_unittest.cc

Issue 2753073006: [Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start. (Closed)
Patch Set: Incorporated mcasas@'s suggestions from PatchSet 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index 1cbd747ea94d183c67410301fa6b0887b39107c6..778b906072a03443890e3cb2a53e69ba3fb0f3e7 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -146,7 +146,7 @@ class MockMediaStreamProviderListener : public MediaStreamProviderListener {
MOCK_METHOD2(Aborted, void(MediaStreamType, int));
}; // class MockMediaStreamProviderListener
-// Needed as an input argument to StartCaptureForClient().
+// Needed as an input argument to ConnectClient().
class MockFrameObserver : public VideoCaptureControllerEventHandler {
public:
MOCK_METHOD1(OnError, void(VideoCaptureControllerID id));
@@ -237,23 +237,18 @@ class VideoCaptureManagerTest : public testing::Test {
gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
VideoCaptureControllerID client_id(next_client_id_++);
- vcm_->StartCaptureForClient(
- session_id,
- params,
- client_id,
- frame_observer_.get(),
+ vcm_->ConnectClient(
+ session_id, params, client_id, frame_observer_.get(),
base::Bind(&VideoCaptureManagerTest::OnGotControllerCallback,
- base::Unretained(this),
- client_id,
- expect_success));
+ base::Unretained(this), client_id, expect_success));
base::RunLoop().RunUntilIdle();
return client_id;
}
void StopClient(VideoCaptureControllerID client_id) {
ASSERT_TRUE(1 == controllers_.count(client_id));
- vcm_->StopCaptureForClient(controllers_[client_id], client_id,
- frame_observer_.get(), false);
+ vcm_->DisconnectClient(controllers_[client_id], client_id,
+ frame_observer_.get(), false);
controllers_.erase(client_id);
}
@@ -350,8 +345,8 @@ TEST_F(VideoCaptureManagerTest, CreateAndAbort) {
// Wait for device opened.
base::RunLoop().RunUntilIdle();
- vcm_->StopCaptureForClient(controllers_[client_id], client_id,
- frame_observer_.get(), true);
+ vcm_->DisconnectClient(controllers_[client_id], client_id,
+ frame_observer_.get(), true);
// Wait to check callbacks before removing the listener.
base::RunLoop().RunUntilIdle();
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698