forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock_device_test.h
40 lines (31 loc) · 1.45 KB
/
mock_device_test.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_VIDEO_CAPTURE_MOCK_DEVICE_TEST_H_
#define SERVICES_VIDEO_CAPTURE_MOCK_DEVICE_TEST_H_
#include "services/service_manager/public/cpp/service_test.h"
#include "services/video_capture/mock_device_descriptor_receiver.h"
#include "services/video_capture/mock_video_capture_device_impl.h"
#include "services/video_capture/mock_video_frame_receiver.h"
#include "services/video_capture/public/cpp/video_capture_settings.h"
#include "services/video_capture/public/interfaces/video_capture_service.mojom.h"
namespace video_capture {
// Reusable test setup for testing with a single mock device.
class MockDeviceTest : public service_manager::test::ServiceTest {
public:
MockDeviceTest();
~MockDeviceTest() override;
void SetUp() override;
protected:
mojom::VideoCaptureServicePtr service_;
mojom::VideoCaptureDeviceFactoryPtr factory_;
MockDeviceDescriptorReceiver descriptor_receiver_;
std::unique_ptr<MockVideoCaptureDeviceImpl> mock_device_;
std::unique_ptr<MockVideoFrameReceiver> mock_receiver_;
mojom::MockVideoCaptureDevicePtr mock_device_proxy_;
mojom::VideoCaptureDeviceProxyPtr device_proxy_;
mojom::VideoFrameReceiverPtr mock_receiver_proxy_;
VideoCaptureSettings requested_settings_;
};
} // namespace video_capture
#endif // SERVICES_VIDEO_CAPTURE_MOCK_DEVICE_TEST_H_