| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ |
| 6 #define SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ | 6 #define SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ |
| 7 | 7 |
| 8 #include "services/video_capture/fake_device_descriptor_test.h" | 8 #include "services/video_capture/fake_device_descriptor_test.h" |
| 9 #include "services/video_capture/public/cpp/capture_settings.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 11 |
| 11 namespace video_capture { | 12 namespace video_capture { |
| 12 | 13 |
| 13 // Test fixture that creates a proxy to the fake device provided by the fake | 14 // Test fixture that creates a proxy to the fake device provided by the fake |
| 14 // device factory. | 15 // device factory. |
| 15 class FakeDeviceTest : public FakeDeviceDescriptorTest { | 16 class FakeDeviceTest : public FakeDeviceDescriptorTest { |
| 16 public: | 17 public: |
| 17 FakeDeviceTest(); | 18 FakeDeviceTest(); |
| 18 ~FakeDeviceTest() override; | 19 ~FakeDeviceTest() override; |
| 19 | 20 |
| 20 void SetUp() override; | 21 void SetUp() override; |
| 21 | 22 |
| 22 protected: | 23 protected: |
| 23 class MockSupportedFormatsReceiver { | 24 class MockSupportedFormatsReceiver { |
| 24 public: | 25 public: |
| 25 MockSupportedFormatsReceiver(); | 26 MockSupportedFormatsReceiver(); |
| 26 ~MockSupportedFormatsReceiver(); | 27 ~MockSupportedFormatsReceiver(); |
| 27 | 28 |
| 28 MOCK_METHOD1(OnGetSupportedFormatsCallback, | 29 MOCK_METHOD1(OnGetSupportedFormatsCallback, |
| 29 void(const std::vector<VideoCaptureFormat>&)); | 30 void(const std::vector<I420CaptureFormat>&)); |
| 31 |
| 30 private: | 32 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(MockSupportedFormatsReceiver); | 33 DISALLOW_COPY_AND_ASSIGN(MockSupportedFormatsReceiver); |
| 32 }; | 34 }; |
| 33 | 35 |
| 34 MockSupportedFormatsReceiver supported_formats_receiver_; | 36 MockSupportedFormatsReceiver supported_formats_receiver_; |
| 35 VideoCaptureFormat fake_device_first_supported_format_; | 37 I420CaptureFormat fake_device_first_supported_format_; |
| 36 VideoCaptureSettings requestable_settings_; | 38 CaptureSettings requestable_settings_; |
| 37 mojom::VideoCaptureDeviceProxyPtr fake_device_proxy_; | 39 mojom::DevicePtr fake_device_proxy_; |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace video_capture | 42 } // namespace video_capture |
| 41 | 43 |
| 42 #endif // SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ | 44 #endif // SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ |
| OLD | NEW |