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

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

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5744a8bbb Nits. Created 6 years, 11 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 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/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Needed as an input argument to StartCaptureForClient(). 46 // Needed as an input argument to StartCaptureForClient().
47 class MockFrameObserver : public VideoCaptureControllerEventHandler { 47 class MockFrameObserver : public VideoCaptureControllerEventHandler {
48 public: 48 public:
49 MOCK_METHOD1(OnError, void(const VideoCaptureControllerID& id)); 49 MOCK_METHOD1(OnError, void(const VideoCaptureControllerID& id));
50 50
51 virtual void OnBufferCreated(const VideoCaptureControllerID& id, 51 virtual void OnBufferCreated(const VideoCaptureControllerID& id,
52 base::SharedMemoryHandle handle, 52 base::SharedMemoryHandle handle,
53 int length, int buffer_id) OVERRIDE {} 53 int length, int buffer_id) OVERRIDE {}
54 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, 54 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id,
55 int buffer_id) OVERRIDE {} 55 int buffer_id) OVERRIDE {}
56 virtual void OnBufferReady( 56 virtual void OnBufferReady(const VideoCaptureControllerID& id,
57 const VideoCaptureControllerID& id, 57 int buffer_id,
58 int buffer_id, 58 const media::VideoCaptureFormat& format,
59 base::TimeTicks timestamp, 59 base::TimeTicks timestamp) OVERRIDE {}
60 const media::VideoCaptureFormat& format) OVERRIDE {} 60 virtual void OnMailboxBufferReady(const VideoCaptureControllerID& id,
61 int buffer_id,
62 const gpu::MailboxHolder& mailbox_holder,
63 const media::VideoCaptureFormat& format,
64 base::TimeTicks timestamp) OVERRIDE {}
61 virtual void OnEnded(const VideoCaptureControllerID& id) OVERRIDE {} 65 virtual void OnEnded(const VideoCaptureControllerID& id) OVERRIDE {}
62 66
63 void OnGotControllerCallback(VideoCaptureControllerID) {} 67 void OnGotControllerCallback(VideoCaptureControllerID) {}
64 }; 68 };
65 69
66 // Test class 70 // Test class
67 class VideoCaptureManagerTest : public testing::Test { 71 class VideoCaptureManagerTest : public testing::Test {
68 public: 72 public:
69 VideoCaptureManagerTest() : next_client_id_(1) {} 73 VideoCaptureManagerTest() : next_client_id_(1) {}
70 virtual ~VideoCaptureManagerTest() {} 74 virtual ~VideoCaptureManagerTest() {}
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 // VideoCaptureManager destructor otherwise. 434 // VideoCaptureManager destructor otherwise.
431 vcm_->Close(video_session_id); 435 vcm_->Close(video_session_id);
432 StopClient(client_id); 436 StopClient(client_id);
433 437
434 // Wait to check callbacks before removing the listener 438 // Wait to check callbacks before removing the listener
435 message_loop_->RunUntilIdle(); 439 message_loop_->RunUntilIdle();
436 vcm_->Unregister(); 440 vcm_->Unregister();
437 } 441 }
438 442
439 } // namespace content 443 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698