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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.h" 5 #include "content/browser/media/capture/desktop_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 base::TimeTicks reference_time, 68 base::TimeTicks reference_time,
69 base::TimeDelta timestamp, 69 base::TimeDelta timestamp,
70 int frame_feedback_id)); 70 int frame_feedback_id));
71 MOCK_METHOD0(DoReserveOutputBuffer, void(void)); 71 MOCK_METHOD0(DoReserveOutputBuffer, void(void));
72 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); 72 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
73 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); 73 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
74 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void)); 74 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
75 MOCK_METHOD2(OnError, 75 MOCK_METHOD2(OnError,
76 void(const tracked_objects::Location& from_here, 76 void(const tracked_objects::Location& from_here,
77 const std::string& reason)); 77 const std::string& reason));
78 MOCK_METHOD0(OnStarted, void(void));
miu 2017/02/09 22:21:49 ditto: One or more unit tests should EXPECT_CALL(O
braveyao 2017/02/14 01:05:49 Done.
78 79
79 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>. 80 // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
80 Buffer ReserveOutputBuffer(const gfx::Size& dimensions, 81 Buffer ReserveOutputBuffer(const gfx::Size& dimensions,
81 media::VideoPixelFormat format, 82 media::VideoPixelFormat format,
82 media::VideoPixelStorage storage, 83 media::VideoPixelStorage storage,
83 int frame_feedback_id) override { 84 int frame_feedback_id) override {
84 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 && 85 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
85 storage == media::PIXEL_STORAGE_CPU); 86 storage == media::PIXEL_STORAGE_CPU);
86 DoReserveOutputBuffer(); 87 DoReserveOutputBuffer();
87 return Buffer(); 88 return Buffer();
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 frame_size); 557 frame_size);
557 for (int i = 0; i < output_frame_->size().height(); ++i) { 558 for (int i = 0; i < output_frame_->size().height(); ++i) {
558 EXPECT_EQ(0, 559 EXPECT_EQ(0,
559 memcmp(inverted_frame->data() + i * inverted_frame->stride(), 560 memcmp(inverted_frame->data() + i * inverted_frame->stride(),
560 output_frame_->data() + i * output_frame_->stride(), 561 output_frame_->data() + i * output_frame_->stride(),
561 output_frame_->stride())); 562 output_frame_->stride()));
562 } 563 }
563 } 564 }
564 565
565 } // namespace content 566 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698