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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_aura_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 base::TimeTicks reference_time, 49 base::TimeTicks reference_time,
50 base::TimeDelta tiemstamp, 50 base::TimeDelta tiemstamp,
51 int frame_feedback_id)); 51 int frame_feedback_id));
52 MOCK_METHOD0(DoReserveOutputBuffer, void(void)); 52 MOCK_METHOD0(DoReserveOutputBuffer, void(void));
53 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); 53 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
54 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); 54 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
55 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void)); 55 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
56 MOCK_METHOD2(OnError, 56 MOCK_METHOD2(OnError,
57 void(const tracked_objects::Location& from_here, 57 void(const tracked_objects::Location& from_here,
58 const std::string& reason)); 58 const std::string& reason));
59 MOCK_METHOD0(OnStarted, void(void));
miu 2017/02/09 22:21:49 Where does DesktopCaptureDeviceAura call OnStarted
miu 2017/02/09 22:21:49 One or more unit tests should probably EXPECT_CALL
braveyao 2017/02/14 01:05:48 It's called in ScreenCaptureDeviceCore::CaptureSta
braveyao 2017/02/14 01:05:48 Done. Thanks for the suggestion!
braveyao 2017/02/15 21:47:15 Oh, no. This test case is to stop immediately afte
59 60
60 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>. 61 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
61 Buffer ReserveOutputBuffer(const gfx::Size& dimensions, 62 Buffer ReserveOutputBuffer(const gfx::Size& dimensions,
62 media::VideoPixelFormat format, 63 media::VideoPixelFormat format,
63 media::VideoPixelStorage storage, 64 media::VideoPixelStorage storage,
64 int frame_feedback_id) override { 65 int frame_feedback_id) override {
65 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 66 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
66 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 67 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
67 DoReserveOutputBuffer(); 68 DoReserveOutputBuffer();
68 return Buffer(); 69 return Buffer();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 media::VideoCaptureParams capture_params; 160 media::VideoCaptureParams capture_params;
160 capture_params.requested_format.frame_size.SetSize(640, 480); 161 capture_params.requested_format.frame_size.SetSize(640, 480);
161 capture_params.requested_format.frame_rate = kFrameRate; 162 capture_params.requested_format.frame_rate = kFrameRate;
162 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 163 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
163 capture_device->AllocateAndStart(capture_params, std::move(client)); 164 capture_device->AllocateAndStart(capture_params, std::move(client));
164 capture_device->StopAndDeAllocate(); 165 capture_device->StopAndDeAllocate();
165 } 166 }
166 167
167 } // namespace 168 } // namespace
168 } // namespace content 169 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698