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

Side by Side Diff: content/browser/media/capture/screen_capture_device_android_unittest.cc

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/media/capture/screen_capture_device_android.h" 5 #include "content/browser/media/capture/screen_capture_device_android.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 15 matching lines...) Expand all
26 base::TimeDelta tiemstamp, 26 base::TimeDelta tiemstamp,
27 int frame_feedback_id)); 27 int frame_feedback_id));
28 MOCK_METHOD0(DoReserveOutputBuffer, void(void)); 28 MOCK_METHOD0(DoReserveOutputBuffer, void(void));
29 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); 29 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
30 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); 30 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
31 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void)); 31 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
32 MOCK_METHOD2(OnError, 32 MOCK_METHOD2(OnError,
33 void(const tracked_objects::Location& from_here, 33 void(const tracked_objects::Location& from_here,
34 const std::string& reason)); 34 const std::string& reason));
35 MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void)); 35 MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void));
36 MOCK_METHOD0(OnStarted, void(void));
miu 2017/02/09 22:21:49 ditto: EXPECT_CALL
braveyao 2017/02/14 01:05:49 Done.
36 37
37 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>. 38 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
38 Buffer ReserveOutputBuffer(const gfx::Size& dimensions, 39 Buffer ReserveOutputBuffer(const gfx::Size& dimensions,
39 media::VideoPixelFormat format, 40 media::VideoPixelFormat format,
40 media::VideoPixelStorage storage, 41 media::VideoPixelStorage storage,
41 int frame_feedback_id) override { 42 int frame_feedback_id) override {
42 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 43 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
43 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 44 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
44 DoReserveOutputBuffer(); 45 DoReserveOutputBuffer();
45 return Buffer(); 46 return Buffer();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 media::VideoCaptureParams capture_params; 97 media::VideoCaptureParams capture_params;
97 capture_params.requested_format.frame_size.SetSize(640, 480); 98 capture_params.requested_format.frame_size.SetSize(640, 480);
98 capture_params.requested_format.frame_rate = kFrameRate; 99 capture_params.requested_format.frame_rate = kFrameRate;
99 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 100 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
100 capture_device->AllocateAndStart(capture_params, std::move(client)); 101 capture_device->AllocateAndStart(capture_params, std::move(client));
101 capture_device->StopAndDeAllocate(); 102 capture_device->StopAndDeAllocate();
102 } 103 }
103 104
104 } // namespace 105 } // namespace
105 } // namespace Content 106 } // namespace Content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698