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

Side by Side Diff: media/capture/video/video_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 class MockVideoCaptureClient : public VideoCaptureDevice::Client { 94 class MockVideoCaptureClient : public VideoCaptureDevice::Client {
95 public: 95 public:
96 MOCK_METHOD0(DoReserveOutputBuffer, void(void)); 96 MOCK_METHOD0(DoReserveOutputBuffer, void(void));
97 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); 97 MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
98 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void)); 98 MOCK_METHOD0(DoOnIncomingCapturedVideoFrame, void(void));
99 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void)); 99 MOCK_METHOD0(DoResurrectLastOutputBuffer, void(void));
100 MOCK_METHOD2(OnError, 100 MOCK_METHOD2(OnError,
101 void(const tracked_objects::Location& from_here, 101 void(const tracked_objects::Location& from_here,
102 const std::string& reason)); 102 const std::string& reason));
103 MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void)); 103 MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void));
104 MOCK_METHOD0(OnStarted, void(void));
104 105
105 explicit MockVideoCaptureClient( 106 explicit MockVideoCaptureClient(
106 base::Callback<void(const VideoCaptureFormat&)> frame_cb) 107 base::Callback<void(const VideoCaptureFormat&)> frame_cb)
107 : main_thread_(base::ThreadTaskRunnerHandle::Get()), frame_cb_(frame_cb) { 108 : main_thread_(base::ThreadTaskRunnerHandle::Get()), frame_cb_(frame_cb) {
108 ON_CALL(*this, OnError(_, _)).WillByDefault(Invoke(DumpError)); 109 ON_CALL(*this, OnError(_, _)).WillByDefault(Invoke(DumpError));
109 } 110 }
110 111
111 void OnIncomingCapturedData(const uint8_t* data, 112 void OnIncomingCapturedData(const uint8_t* data,
112 int length, 113 int length,
113 const VideoCaptureFormat& format, 114 const VideoCaptureFormat& format,
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 632
632 device->GetPhotoCapabilities(std::move(scoped_get_callback)); 633 device->GetPhotoCapabilities(std::move(scoped_get_callback));
633 run_loop.Run(); 634 run_loop.Run();
634 635
635 ASSERT_TRUE(image_capture_client_->capabilities()); 636 ASSERT_TRUE(image_capture_client_->capabilities());
636 637
637 device->StopAndDeAllocate(); 638 device->StopAndDeAllocate();
638 } 639 }
639 640
640 }; // namespace media 641 }; // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698