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

Unified 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, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index 8d8e9aa0ead3035e31d23a8882ed5bab6a06e2c3..167802e3cf36a3ca338c77473964e1d9c0036f30 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -179,11 +179,20 @@ class MockVideoCapturerSource : public media::VideoCapturerSource {
int max_requested_width,
int max_requested_height,
double max_requested_frame_rate,
- const VideoCaptureDeviceFormatsCB& callback) override {}
- void StartCapture(
- const media::VideoCaptureParams& params,
- const VideoCaptureDeliverFrameCB& new_frame_callback,
- const RunningCallback& running_callback) override {}
+ const VideoCaptureDeviceFormatsCB& callback) override {
+ const int supported_width = 640;
+ const int supported_height = 480;
+ const float supported_framerate = 60.0;
+ callback.Run(media::VideoCaptureFormats(
+ 1, media::VideoCaptureFormat(
+ gfx::Size(supported_width, supported_height),
+ supported_framerate, media::PIXEL_FORMAT_I420)));
+ }
+ void StartCapture(const media::VideoCaptureParams& params,
+ const VideoCaptureDeliverFrameCB& new_frame_callback,
+ const RunningCallback& running_callback) override {
+ running_callback.Run(true);
+ }
void StopCapture() override {}
};
« 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