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

Side by Side Diff: content/renderer/media/video_capture_impl_manager_unittest.cc

Issue 1315993003: Reland: Change VideoCaptureDeliverFrameCB's signature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address new changes Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/child/child_process.h" 10 #include "content/child/child_process.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 FROM_HERE, base::Bind(&VideoCaptureImplManagerTest::FakeChannelSetup, 84 FROM_HERE, base::Bind(&VideoCaptureImplManagerTest::FakeChannelSetup,
85 base::Unretained(this))); 85 base::Unretained(this)));
86 return; 86 return;
87 } 87 }
88 manager_->video_capture_message_filter()->OnFilterAdded(NULL); 88 manager_->video_capture_message_filter()->OnFilterAdded(NULL);
89 } 89 }
90 90
91 protected: 91 protected:
92 MOCK_METHOD2(OnFrameReady, 92 MOCK_METHOD2(OnFrameReady,
93 void(const scoped_refptr<media::VideoFrame>&, 93 void(const scoped_refptr<media::VideoFrame>&,
94 const base::TimeTicks& estimated_capture_time)); 94 base::TimeTicks estimated_capture_time));
95 MOCK_METHOD0(OnStarted, void()); 95 MOCK_METHOD0(OnStarted, void());
96 MOCK_METHOD0(OnStopped, void()); 96 MOCK_METHOD0(OnStopped, void());
97 97
98 void OnStateUpdate(VideoCaptureState state) { 98 void OnStateUpdate(VideoCaptureState state) {
99 switch (state) { 99 switch (state) {
100 case VIDEO_CAPTURE_STATE_STARTED: 100 case VIDEO_CAPTURE_STATE_STARTED:
101 OnStarted(); 101 OnStarted();
102 break; 102 break;
103 case VIDEO_CAPTURE_STATE_STOPPED: 103 case VIDEO_CAPTURE_STATE_STOPPED:
104 OnStopped(); 104 OnStopped();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 EXPECT_DEATH(base::Closure release_cb2 = manager_->UseDevice(0), ""); 164 EXPECT_DEATH(base::Closure release_cb2 = manager_->UseDevice(0), "");
165 } 165 }
166 166
167 TEST_F(VideoCaptureImplManagerTest, NoLeak) { 167 TEST_F(VideoCaptureImplManagerTest, NoLeak) {
168 manager_->UseDevice(0).Reset(); 168 manager_->UseDevice(0).Reset();
169 manager_.reset(); 169 manager_.reset();
170 cleanup_run_loop_.Run(); 170 cleanup_run_loop_.Run();
171 } 171 }
172 172
173 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_renderer.cc ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698