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

Unified Diff: services/video_capture/mock_device_video_capture_service_unittest.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_unittest.cc
diff --git a/services/video_capture/mock_device_video_capture_service_unittest.cc b/services/video_capture/mock_device_video_capture_service_unittest.cc
deleted file mode 100644
index 1e44ca9580cd41090c09cb05fde89248a5553c10..0000000000000000000000000000000000000000
--- a/services/video_capture/mock_device_video_capture_service_unittest.cc
+++ /dev/null
@@ -1,51 +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 "base/run_loop.h"
-#include "services/video_capture/mock_device_video_capture_service_test.h"
-
-using testing::_;
-using testing::InvokeWithoutArgs;
-
-namespace video_capture {
-
-// Tests that the service stops the capture device when the client closes the
-// connection to the device proxy.
-TEST_F(MockDeviceVideoCaptureServiceTest,
- DeviceIsStoppedWhenDiscardingDeviceProxy) {
- base::RunLoop wait_loop;
-
- EXPECT_CALL(*mock_device_, AllocateAndStartPtr(_));
- EXPECT_CALL(*mock_device_, StopAndDeAllocate())
- .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
-
- device_proxy_->Start(requested_format_,
- media::RESOLUTION_POLICY_FIXED_RESOLUTION,
- media::PowerLineFrequency::FREQUENCY_DEFAULT,
- std::move(mock_receiver_proxy_));
- device_proxy_.reset();
-
- wait_loop.Run();
-}
-
-// Tests that the service stops the capture device when the client closes the
-// connection to the client proxy it provided to the service.
-TEST_F(MockDeviceVideoCaptureServiceTest,
- DeviceIsStoppedWhenDiscardingDeviceClient) {
- base::RunLoop wait_loop;
-
- EXPECT_CALL(*mock_device_, AllocateAndStartPtr(_));
- EXPECT_CALL(*mock_device_, StopAndDeAllocate())
- .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
-
- device_proxy_->Start(requested_format_,
- media::RESOLUTION_POLICY_FIXED_RESOLUTION,
- media::PowerLineFrequency::FREQUENCY_DEFAULT,
- std::move(mock_receiver_proxy_));
- mock_receiver_.reset();
-
- wait_loop.Run();
-}
-
-} // namespace video_capture

Powered by Google App Engine
This is Rietveld 408576698