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

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

Issue 10071038: RefCounted types should not have public destructors, content/browser part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 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 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "content/common/media/video_capture_messages.h" 6 #include "content/common/media/video_capture_messages.h"
7 #include "content/renderer/media/video_capture_impl.h" 7 #include "content/renderer/media/video_capture_impl.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 using ::testing::_; 11 using ::testing::_;
12 using ::testing::AtLeast; 12 using ::testing::AtLeast;
13 using ::testing::Return; 13 using ::testing::Return;
14 14
15 #define CAPABILITY_SMALL {176, 144, 30, 0, media::VideoFrame::I420, \ 15 #define CAPABILITY_SMALL {176, 144, 30, 0, media::VideoFrame::I420, \
16 false } 16 false }
17 #define CAPABILITY_LARGE {320, 240, 30, 0, media::VideoFrame::I420, \ 17 #define CAPABILITY_LARGE {320, 240, 30, 0, media::VideoFrame::I420, \
18 false } 18 false }
19 19
20 class MockVideoCaptureMessageFilter : public VideoCaptureMessageFilter { 20 class MockVideoCaptureMessageFilter : public VideoCaptureMessageFilter {
21 public: 21 public:
22 MockVideoCaptureMessageFilter() : VideoCaptureMessageFilter() {} 22 MockVideoCaptureMessageFilter() : VideoCaptureMessageFilter() {}
23 virtual ~MockVideoCaptureMessageFilter() {}
24 23
25 // Filter implementation. 24 // Filter implementation.
26 MOCK_METHOD1(Send, bool(IPC::Message* message)); 25 MOCK_METHOD1(Send, bool(IPC::Message* message));
27 26
28 private: 27 private:
28 virtual ~MockVideoCaptureMessageFilter() {}
29
29 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureMessageFilter); 30 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureMessageFilter);
30 }; 31 };
31 32
32 class MockVideoCaptureClient : public media::VideoCapture::EventHandler { 33 class MockVideoCaptureClient : public media::VideoCapture::EventHandler {
33 public: 34 public:
34 MockVideoCaptureClient() {} 35 MockVideoCaptureClient() {}
35 virtual ~MockVideoCaptureClient() {} 36 virtual ~MockVideoCaptureClient() {}
36 37
37 // EventHandler implementation. 38 // EventHandler implementation.
38 MOCK_METHOD1(OnStarted, void(media::VideoCapture* capture)); 39 MOCK_METHOD1(OnStarted, void(media::VideoCapture* capture));
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 .WillOnce(Return()); 291 .WillOnce(Return());
291 EXPECT_CALL(*client2, OnStopped(_)) 292 EXPECT_CALL(*client2, OnStopped(_))
292 .WillOnce(Return()); 293 .WillOnce(Return());
293 EXPECT_CALL(*client2, OnRemoved(_)) 294 EXPECT_CALL(*client2, OnRemoved(_))
294 .WillOnce(Return()); 295 .WillOnce(Return());
295 296
296 video_capture_impl_->StopCapture(client1.get()); 297 video_capture_impl_->StopCapture(client1.get());
297 video_capture_impl_->StopCapture(client2.get()); 298 video_capture_impl_->StopCapture(client2.get());
298 message_loop_->RunAllPending(); 299 message_loop_->RunAllPending();
299 } 300 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698