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

Side by Side Diff: services/video_capture/fake_device_test.h

Issue 2486543002: [Mojo Video Capture] Add test ReceiveFramesFromFakeCaptureDevice (Closed)
Patch Set: mcasas comments mk2 Created 4 years, 1 month 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
OLDNEW
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 "testing/gmock/include/gmock/gmock.h"
9 10
10 namespace video_capture { 11 namespace video_capture {
11 12
12 // Test fixture that creates a proxy to the fake device provided by the fake 13 // Test fixture that creates a proxy to the fake device provided by the fake
13 // device factory. 14 // device factory.
14 class FakeDeviceTest : public FakeDeviceDescriptorTest { 15 class FakeDeviceTest : public FakeDeviceDescriptorTest {
15 public: 16 public:
16 FakeDeviceTest(); 17 FakeDeviceTest();
17 ~FakeDeviceTest() override; 18 ~FakeDeviceTest() override;
18 19
19 void SetUp() override; 20 void SetUp() override;
20 21
21 protected: 22 protected:
23 class MockSupportedFormatsReceiver {
24 public:
25 MockSupportedFormatsReceiver();
26 ~MockSupportedFormatsReceiver();
27
28 MOCK_METHOD1(OnGetSupportedFormatsCallback,
29 void(const std::vector<VideoCaptureFormat>&));
30 private:
31 DISALLOW_COPY_AND_ASSIGN(MockSupportedFormatsReceiver);
32 };
33
34 MockSupportedFormatsReceiver supported_formats_receiver_;
35 VideoCaptureFormat fake_device_first_supported_format_;
36 VideoCaptureSettings requestable_settings_;
22 mojom::VideoCaptureDeviceProxyPtr fake_device_proxy_; 37 mojom::VideoCaptureDeviceProxyPtr fake_device_proxy_;
23 }; 38 };
24 39
25 } // namespace video_capture 40 } // namespace video_capture
26 41
27 #endif // SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_ 42 #endif // SERVICES_VIDEO_CAPTURE_FAKE_DEVICE_TEST_H_
OLDNEW
« no previous file with comments | « services/video_capture/device_factory_media_to_mojo_adapter.cc ('k') | services/video_capture/fake_device_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698