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

Side by Side Diff: content/browser/renderer_host/media/video_capture_device_client_unittest.cc

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "media/capture/video/video_capture_device_client.h" 5 #include "media/capture/video/video_capture_device_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 26 matching lines...) Expand all
37 : VideoCaptureController(max_buffers) {} 37 : VideoCaptureController(max_buffers) {}
38 ~MockVideoCaptureController() override {} 38 ~MockVideoCaptureController() override {}
39 39
40 MOCK_METHOD1(MockOnIncomingCapturedVideoFrame, void(const gfx::Size&)); 40 MOCK_METHOD1(MockOnIncomingCapturedVideoFrame, void(const gfx::Size&));
41 MOCK_METHOD0(OnError, void()); 41 MOCK_METHOD0(OnError, void());
42 MOCK_METHOD1(OnLog, void(const std::string& message)); 42 MOCK_METHOD1(OnLog, void(const std::string& message));
43 MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id_to_drop)); 43 MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id_to_drop));
44 44
45 void OnIncomingCapturedVideoFrame( 45 void OnIncomingCapturedVideoFrame(
46 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 46 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
47 const scoped_refptr<media::VideoFrame>& frame) override { 47 scoped_refptr<media::VideoFrame> frame) override {
48 MockOnIncomingCapturedVideoFrame(frame->coded_size()); 48 MockOnIncomingCapturedVideoFrame(frame->coded_size());
49 } 49 }
50 }; 50 };
51 51
52 // Note that this test does not exercise the class VideoCaptureDeviceClient 52 // Note that this test does not exercise the class VideoCaptureDeviceClient
53 // in isolation. The "unit under test" is an instance of 53 // in isolation. The "unit under test" is an instance of
54 // VideoCaptureDeviceClient with some context that is specific to 54 // VideoCaptureDeviceClient with some context that is specific to
55 // renderer_host/media, and therefore this test must live here and not in 55 // renderer_host/media, and therefore this test must live here and not in
56 // media/capture/video. 56 // media/capture/video.
57 class VideoCaptureDeviceClientTest : public ::testing::Test { 57 class VideoCaptureDeviceClientTest : public ::testing::Test {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); 231 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width());
232 EXPECT_EQ(coded_size.height(), 232 EXPECT_EQ(coded_size.height(),
233 size_and_rotation.output_resolution.height()); 233 size_and_rotation.output_resolution.height());
234 234
235 Mock::VerifyAndClearExpectations(controller_.get()); 235 Mock::VerifyAndClearExpectations(controller_.get());
236 } 236 }
237 } 237 }
238 238
239 } // namespace content 239 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698