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

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

Issue 8304017: enable video capture to support sharing across multiple renderer processes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VideoCaptureManager 5 // Unit test for VideoCaptureManager
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace { 58 namespace {
59 59
60 // Needed as an input argument to Start() 60 // Needed as an input argument to Start()
61 class MockFrameObserver: public media::VideoCaptureDevice::EventHandler { 61 class MockFrameObserver: public media::VideoCaptureDevice::EventHandler {
62 public: 62 public:
63 virtual void OnError() {} 63 virtual void OnError() {}
64 void OnFrameInfo(const media::VideoCaptureDevice::Capability& info) {} 64 void OnFrameInfo(const media::VideoCaptureDevice::Capability& info) {}
65 virtual void OnIncomingCapturedFrame(const uint8* data, int length, 65 virtual void OnIncomingCapturedFrame(const uint8* data, int length,
66 base::Time timestamp) {} 66 base::Time timestamp) {}
67 virtual void OnDeviceState(bool in_use) {}
perkj_chrome 2011/10/28 08:37:19 remove
wjia(left Chromium) 2011/10/29 02:34:40 Done.
67 }; 68 };
68 69
69 // Test class 70 // Test class
70 class VideoCaptureManagerTest : public testing::Test { 71 class VideoCaptureManagerTest : public testing::Test {
71 public: 72 public:
72 VideoCaptureManagerTest() 73 VideoCaptureManagerTest()
73 : vcm_(), 74 : vcm_(),
74 listener_(), 75 listener_(),
75 message_loop_(), 76 message_loop_(),
76 io_thread_(), 77 io_thread_(),
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 vcm_->Open(*it); 299 vcm_->Open(*it);
299 300
300 // Wait to check callbacks before removing the listener 301 // Wait to check callbacks before removing the listener
301 SyncWithVideoCaptureManagerThread(); 302 SyncWithVideoCaptureManagerThread();
302 303
303 // Delete the manager. 304 // Delete the manager.
304 vcm_.reset(); 305 vcm_.reset();
305 } 306 }
306 307
307 } // namespace 308 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698