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

Unified Diff: services/video_capture/mock_device_video_capture_service_test.cc

Issue 2457003002: [Mojo Video Capture] Simplify API and some cleanups (Closed)
Patch Set: Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: services/video_capture/mock_device_video_capture_service_test.cc
diff --git a/services/video_capture/mock_device_video_capture_service_test.cc b/services/video_capture/mock_device_video_capture_service_test.cc
deleted file mode 100644
index 14f364723db43ba4a3cdab075ec573a3c088545c..0000000000000000000000000000000000000000
--- a/services/video_capture/mock_device_video_capture_service_test.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.
-
-#include "services/video_capture/mock_device_video_capture_service_test.h"
-
-namespace video_capture {
-
-MockDeviceVideoCaptureServiceTest::MockDeviceVideoCaptureServiceTest()
- : service_manager::test::ServiceTest("exe:video_capture_unittests") {}
-
-MockDeviceVideoCaptureServiceTest::~MockDeviceVideoCaptureServiceTest() =
- default;
-
-void MockDeviceVideoCaptureServiceTest::SetUp() {
- ServiceTest::SetUp();
- connector()->ConnectToInterface("service:video_capture", &service_);
- service_->ConnectToMockDeviceFactory(mojo::GetProxy(&factory_));
-
- // Set up a mock device and add it to the factory
- mock_device_ = base::MakeUnique<MockVideoCaptureDeviceImpl>(
- mojo::GetProxy(&mock_device_proxy_));
- auto mock_descriptor = mojom::VideoCaptureDeviceDescriptor::New();
- mock_descriptor->device_id = "MockDeviceId";
- ASSERT_TRUE(service_->AddDeviceToMockFactory(std::move(mock_device_proxy_),
- mock_descriptor->Clone()));
-
- // Obtain the mock device from the factory
- factory_->CreateDeviceProxy(
- mock_descriptor->Clone(), mojo::GetProxy(&device_proxy_),
- base::Bind([](mojom::DeviceAccessResultCode result_code) {}));
-
- requested_format_.frame_size = gfx::Size(800, 600);
- requested_format_.frame_rate = 15;
- requested_format_.pixel_format = media::PIXEL_FORMAT_I420;
- requested_format_.pixel_storage = media::PIXEL_STORAGE_CPU;
- mock_receiver_ = base::MakeUnique<MockVideoFrameReceiver>(
- mojo::GetProxy(&mock_receiver_proxy_));
-}
-
-} // namespace video_capture

Powered by Google App Engine
This is Rietveld 408576698