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

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

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 27 matching lines...) Expand all
38 MOCK_METHOD2(DevicesEnumerated, void(MediaStreamType, 38 MOCK_METHOD2(DevicesEnumerated, void(MediaStreamType,
39 const StreamDeviceInfoArray&)); 39 const StreamDeviceInfoArray&));
40 MOCK_METHOD3(Error, void(MediaStreamType, int, 40 MOCK_METHOD3(Error, void(MediaStreamType, int,
41 MediaStreamProviderError)); 41 MediaStreamProviderError));
42 }; // class MockMediaStreamProviderListener 42 }; // class MockMediaStreamProviderListener
43 43
44 // Needed as an input argument to Start(). 44 // Needed as an input argument to Start().
45 class MockFrameObserver : public media::VideoCaptureDevice::EventHandler { 45 class MockFrameObserver : public media::VideoCaptureDevice::EventHandler {
46 public: 46 public:
47 virtual void OnError() OVERRIDE {} 47 virtual void OnError() OVERRIDE {}
48 void OnFrameInfo(const media::VideoCaptureCapability& info) {} 48 virtual void OnFrameInfo(
49 const media::VideoCaptureCapability& info) OVERRIDE {}
49 virtual void OnIncomingCapturedFrame(const uint8* data, 50 virtual void OnIncomingCapturedFrame(const uint8* data,
50 int length, 51 int length,
51 base::Time timestamp) OVERRIDE {} 52 base::Time timestamp) OVERRIDE {}
52 virtual void OnIncomingCapturedVideoFrame(media::VideoFrame* frame, 53 virtual void OnIncomingCapturedVideoFrame(media::VideoFrame* frame,
53 base::Time timestamp) OVERRIDE {} 54 base::Time timestamp) OVERRIDE {}
54 }; 55 };
55 56
56 // Test class 57 // Test class
57 class VideoCaptureManagerTest : public testing::Test { 58 class VideoCaptureManagerTest : public testing::Test {
58 public: 59 public:
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // VideoCaptureManager destructor otherwise. 257 // VideoCaptureManager destructor otherwise.
257 vcm_->Close(video_session_id); 258 vcm_->Close(video_session_id);
258 vcm_->Stop(video_session_id, base::Closure()); 259 vcm_->Stop(video_session_id, base::Closure());
259 260
260 // Wait to check callbacks before removing the listener 261 // Wait to check callbacks before removing the listener
261 message_loop_->RunUntilIdle(); 262 message_loop_->RunUntilIdle();
262 vcm_->Unregister(); 263 vcm_->Unregister();
263 } 264 }
264 265
265 } // namespace content 266 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698