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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 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 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, 84 FROM_HERE,
85 base::Bind( 85 base::Bind(
86 &VideoCaptureImplManagerTest::FakeChannelSetup, 86 &VideoCaptureImplManagerTest::FakeChannelSetup,
87 base::Unretained(this))); 87 base::Unretained(this)));
88 return; 88 return;
89 } 89 }
90 manager_->video_capture_message_filter()->OnFilterAdded(NULL); 90 manager_->video_capture_message_filter()->OnFilterAdded(NULL);
91 } 91 }
92 92
93 protected: 93 protected:
94 MOCK_METHOD3(OnFrameReady, 94 MOCK_METHOD2(OnFrameReady,
95 void(const scoped_refptr<media::VideoFrame>&, 95 void(const scoped_refptr<media::VideoFrame>&,
96 const media::VideoCaptureFormat&,
97 const base::TimeTicks& estimated_capture_time)); 96 const base::TimeTicks& estimated_capture_time));
98 MOCK_METHOD0(OnStarted, void()); 97 MOCK_METHOD0(OnStarted, void());
99 MOCK_METHOD0(OnStopped, void()); 98 MOCK_METHOD0(OnStopped, void());
100 99
101 void OnStateUpdate(VideoCaptureState state) { 100 void OnStateUpdate(VideoCaptureState state) {
102 switch (state) { 101 switch (state) {
103 case VIDEO_CAPTURE_STATE_STARTED: 102 case VIDEO_CAPTURE_STATE_STARTED:
104 OnStarted(); 103 OnStarted();
105 break; 104 break;
106 case VIDEO_CAPTURE_STATE_STOPPED: 105 case VIDEO_CAPTURE_STATE_STOPPED:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 cleanup_run_loop_.Run(); 165 cleanup_run_loop_.Run();
167 } 166 }
168 167
169 TEST_F(VideoCaptureImplManagerTest, NoLeak) { 168 TEST_F(VideoCaptureImplManagerTest, NoLeak) {
170 manager_->UseDevice(0).Reset(); 169 manager_->UseDevice(0).Reset();
171 manager_.reset(); 170 manager_.reset();
172 cleanup_run_loop_.Run(); 171 cleanup_run_loop_.Run();
173 } 172 }
174 173
175 } // namespace content 174 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl.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