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

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

Issue 418283003: "Buttery Smooth" Tab Capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Un-inline some methods, plus REBASE. Created 6 years, 4 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 | Annotate | Revision Log
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 // Unit test for VideoCaptureController. 5 // Unit test for VideoCaptureController.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Test class. 108 // Test class.
109 class VideoCaptureControllerTest : public testing::Test { 109 class VideoCaptureControllerTest : public testing::Test {
110 public: 110 public:
111 VideoCaptureControllerTest() {} 111 VideoCaptureControllerTest() {}
112 virtual ~VideoCaptureControllerTest() {} 112 virtual ~VideoCaptureControllerTest() {}
113 113
114 protected: 114 protected:
115 static const int kPoolSize = 3; 115 static const int kPoolSize = 3;
116 116
117 virtual void SetUp() OVERRIDE { 117 virtual void SetUp() OVERRIDE {
118 controller_.reset(new VideoCaptureController()); 118 controller_.reset(new VideoCaptureController(kPoolSize));
119 device_ = controller_->NewDeviceClient().Pass(); 119 device_ = controller_->NewDeviceClient().Pass();
120 client_a_.reset(new MockVideoCaptureControllerEventHandler( 120 client_a_.reset(new MockVideoCaptureControllerEventHandler(
121 controller_.get())); 121 controller_.get()));
122 client_b_.reset(new MockVideoCaptureControllerEventHandler( 122 client_b_.reset(new MockVideoCaptureControllerEventHandler(
123 controller_.get())); 123 controller_.get()));
124 } 124 }
125 125
126 virtual void TearDown() OVERRIDE { 126 virtual void TearDown() OVERRIDE {
127 base::RunLoop().RunUntilIdle(); 127 base::RunLoop().RunUntilIdle();
128 } 128 }
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 634
635 // Second client connects after the error state. It also should get told of 635 // Second client connects after the error state. It also should get told of
636 // the error. 636 // the error.
637 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1); 637 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1);
638 controller_->AddClient( 638 controller_->AddClient(
639 route_id, client_b_.get(), base::kNullProcessHandle, 200, session_200); 639 route_id, client_b_.get(), base::kNullProcessHandle, 200, session_200);
640 Mock::VerifyAndClearExpectations(client_b_.get()); 640 Mock::VerifyAndClearExpectations(client_b_.get());
641 } 641 }
642 642
643 } // namespace content 643 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698