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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2023203002: Extend Blink mock devices to return frame rate on getSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 class MockVideoCapturerSource : public media::VideoCapturerSource { 173 class MockVideoCapturerSource : public media::VideoCapturerSource {
174 public: 174 public:
175 MockVideoCapturerSource() = default; 175 MockVideoCapturerSource() = default;
176 ~MockVideoCapturerSource() override {} 176 ~MockVideoCapturerSource() override {}
177 177
178 void GetCurrentSupportedFormats( 178 void GetCurrentSupportedFormats(
179 int max_requested_width, 179 int max_requested_width,
180 int max_requested_height, 180 int max_requested_height,
181 double max_requested_frame_rate, 181 double max_requested_frame_rate,
182 const VideoCaptureDeviceFormatsCB& callback) override {} 182 const VideoCaptureDeviceFormatsCB& callback) override {
183 void StartCapture( 183 const int supported_width = 640;
184 const media::VideoCaptureParams& params, 184 const int supported_height = 480;
185 const VideoCaptureDeliverFrameCB& new_frame_callback, 185 const float supported_framerate = 60.0;
186 const RunningCallback& running_callback) override {} 186 callback.Run(media::VideoCaptureFormats(
187 1, media::VideoCaptureFormat(
188 gfx::Size(supported_width, supported_height),
189 supported_framerate, media::PIXEL_FORMAT_I420)));
190 }
191 void StartCapture(const media::VideoCaptureParams& params,
192 const VideoCaptureDeliverFrameCB& new_frame_callback,
193 const RunningCallback& running_callback) override {
194 running_callback.Run(true);
195 }
187 void StopCapture() override {} 196 void StopCapture() override {}
188 }; 197 };
189 198
190 class MockAudioCapturerSource : public media::AudioCapturerSource { 199 class MockAudioCapturerSource : public media::AudioCapturerSource {
191 public: 200 public:
192 MockAudioCapturerSource() = default; 201 MockAudioCapturerSource() = default;
193 202
194 void Initialize(const media::AudioParameters& params, 203 void Initialize(const media::AudioParameters& params,
195 CaptureCallback* callback, 204 CaptureCallback* callback,
196 int session_id) override {} 205 int session_id) override {}
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 get_bluetooth_events_callbacks_.pop_front(); 1014 get_bluetooth_events_callbacks_.pop_front();
1006 callback.Run(events); 1015 callback.Run(events);
1007 } 1016 }
1008 1017
1009 void BlinkTestRunner::ReportLeakDetectionResult( 1018 void BlinkTestRunner::ReportLeakDetectionResult(
1010 const LeakDetectionResult& report) { 1019 const LeakDetectionResult& report) {
1011 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1020 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1012 } 1021 }
1013 1022
1014 } // namespace content 1023 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698