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

Unified Diff: media/capture/video/video_capture_device_unittest.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « media/capture/video/video_capture_device_factory.cc ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device_unittest.cc
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc
index 763fa1d2312fb9d469476d46b8cbb89993e1b4bc..7db16aa9f29fa62fe70e1cc2da5c856dab88c493 100644
--- a/media/capture/video/video_capture_device_unittest.cc
+++ b/media/capture/video/video_capture_device_unittest.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "media/capture/video/video_capture_device.h"
+
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -16,7 +19,6 @@
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "media/base/video_capture_types.h"
-#include "media/capture/video/video_capture_device.h"
#include "media/capture/video/video_capture_device_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -323,7 +325,7 @@ TEST_P(VideoCaptureDeviceTest, CaptureWithSize) {
capture_params.requested_format.frame_rate = 30.0f;
capture_params.requested_format.pixel_format =
PIXEL_FORMAT_I420;
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
// Get captured video frames.
WaitForCapturedFrame();
EXPECT_EQ(last_format().frame_size.width(), width);
@@ -357,7 +359,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateBadSize) {
capture_params.requested_format.frame_rate = 35;
capture_params.requested_format.pixel_format =
PIXEL_FORMAT_I420;
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
WaitForCapturedFrame();
device->StopAndDeAllocate();
EXPECT_EQ(last_format().frame_size.width(), input_size.width());
@@ -389,7 +391,7 @@ TEST_F(VideoCaptureDeviceTest, DISABLED_ReAllocateCamera) {
capture_params.requested_format.frame_size = resolution;
capture_params.requested_format.frame_rate = 30;
capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420;
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
device->StopAndDeAllocate();
}
@@ -403,7 +405,7 @@ TEST_F(VideoCaptureDeviceTest, DISABLED_ReAllocateCamera) {
scoped_ptr<VideoCaptureDevice> device(
video_capture_device_factory_->Create(names_->front()));
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
WaitForCapturedFrame();
device->StopAndDeAllocate();
device.reset();
@@ -427,7 +429,7 @@ TEST_F(VideoCaptureDeviceTest, DeAllocateCameraWhileRunning) {
capture_params.requested_format.frame_size.SetSize(640, 480);
capture_params.requested_format.frame_rate = 30;
capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420;
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
// Get captured video frames.
WaitForCapturedFrame();
EXPECT_EQ(last_format().frame_size.width(), 640);
@@ -460,7 +462,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_CaptureMjpeg) {
capture_params.requested_format.frame_size.SetSize(1280, 720);
capture_params.requested_format.frame_rate = 30;
capture_params.requested_format.pixel_format = PIXEL_FORMAT_MJPEG;
- device->AllocateAndStart(capture_params, client_.Pass());
+ device->AllocateAndStart(capture_params, std::move(client_));
// Get captured video frames.
WaitForCapturedFrame();
// Verify we get MJPEG from the device. Not all devices can capture 1280x720
« no previous file with comments | « media/capture/video/video_capture_device_factory.cc ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698