| OLD | NEW |
| 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 #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, media::VideoFrame::I420, 0, \ | 15 #define CAPABILITY_SMALL {176, 144, 30, media::VideoCaptureCapability::kI420, \ |
| 16 false } | 16 0, false } |
| 17 #define CAPABILITY_LARGE {320, 240, 30, media::VideoFrame::I420, 0, \ | 17 #define CAPABILITY_LARGE {320, 240, 30, media::VideoCaptureCapability::kI420, \ |
| 18 false } | 18 0, 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() {} | 23 virtual ~MockVideoCaptureMessageFilter() {} |
| 24 | 24 |
| 25 // Filter implementation. | 25 // Filter implementation. |
| 26 MOCK_METHOD1(Send, bool(IPC::Message* message)); | 26 MOCK_METHOD1(Send, bool(IPC::Message* message)); |
| 27 | 27 |
| 28 private: | 28 private: |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 .WillOnce(Return()); | 284 .WillOnce(Return()); |
| 285 EXPECT_CALL(*client2, OnStopped(_)) | 285 EXPECT_CALL(*client2, OnStopped(_)) |
| 286 .WillOnce(Return()); | 286 .WillOnce(Return()); |
| 287 EXPECT_CALL(*client2, OnRemoved(_)) | 287 EXPECT_CALL(*client2, OnRemoved(_)) |
| 288 .WillOnce(Return()); | 288 .WillOnce(Return()); |
| 289 | 289 |
| 290 video_capture_impl_->StopCapture(client1.get()); | 290 video_capture_impl_->StopCapture(client1.get()); |
| 291 video_capture_impl_->StopCapture(client2.get()); | 291 video_capture_impl_->StopCapture(client2.get()); |
| 292 message_loop_->RunAllPending(); | 292 message_loop_->RunAllPending(); |
| 293 } | 293 } |
| OLD | NEW |