| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/renderer_host/media/video_capture_device_client.h" | 5 #include "content/browser/renderer_host/media/video_capture_device_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 ~MockVideoCaptureController() override {} | 38 ~MockVideoCaptureController() override {} |
| 39 | 39 |
| 40 MOCK_METHOD1(MockDoIncomingCapturedVideoFrameOnIOThread, | 40 MOCK_METHOD1(MockDoIncomingCapturedVideoFrameOnIOThread, |
| 41 void(const gfx::Size&)); | 41 void(const gfx::Size&)); |
| 42 MOCK_METHOD0(DoErrorOnIOThread, void()); | 42 MOCK_METHOD0(DoErrorOnIOThread, void()); |
| 43 MOCK_METHOD1(DoLogOnIOThread, void(const std::string& message)); | 43 MOCK_METHOD1(DoLogOnIOThread, void(const std::string& message)); |
| 44 MOCK_METHOD1(DoBufferDestroyedOnIOThread, void(int buffer_id_to_drop)); | 44 MOCK_METHOD1(DoBufferDestroyedOnIOThread, void(int buffer_id_to_drop)); |
| 45 | 45 |
| 46 void DoIncomingCapturedVideoFrameOnIOThread( | 46 void DoIncomingCapturedVideoFrameOnIOThread( |
| 47 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, | 47 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, |
| 48 const scoped_refptr<media::VideoFrame>& frame, | 48 const scoped_refptr<media::VideoFrame>& frame) override { |
| 49 const base::TimeTicks& timestamp) override { | |
| 50 MockDoIncomingCapturedVideoFrameOnIOThread(frame->coded_size()); | 49 MockDoIncomingCapturedVideoFrameOnIOThread(frame->coded_size()); |
| 51 } | 50 } |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 class VideoCaptureDeviceClientTest : public ::testing::Test { | 53 class VideoCaptureDeviceClientTest : public ::testing::Test { |
| 55 public: | 54 public: |
| 56 VideoCaptureDeviceClientTest() | 55 VideoCaptureDeviceClientTest() |
| 57 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), | 56 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), |
| 58 controller_(new MockVideoCaptureController(1)), | 57 controller_(new MockVideoCaptureController(1)), |
| 59 device_client_(controller_->NewDeviceClient()) {} | 58 device_client_(controller_->NewDeviceClient()) {} |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 229 |
| 231 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); | 230 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); |
| 232 EXPECT_EQ(coded_size.height(), | 231 EXPECT_EQ(coded_size.height(), |
| 233 size_and_rotation.output_resolution.height()); | 232 size_and_rotation.output_resolution.height()); |
| 234 | 233 |
| 235 Mock::VerifyAndClearExpectations(controller_.get()); | 234 Mock::VerifyAndClearExpectations(controller_.get()); |
| 236 } | 235 } |
| 237 } | 236 } |
| 238 | 237 |
| 239 } // namespace content | 238 } // namespace content |
| OLD | NEW |