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

Unified Diff: content/renderer/media/media_stream_video_source_unittest.cc

Issue 528783002: Change MediaStreamVideoSource::StartSourceImpl to use VideoCaptureFormat instead of VideoCapturePar… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 3 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
Index: content/renderer/media/media_stream_video_source_unittest.cc
diff --git a/content/renderer/media/media_stream_video_source_unittest.cc b/content/renderer/media/media_stream_video_source_unittest.cc
index dfd0a4bc5089fc2f91b03bf03524281ec6e4ceec..40d60f7eb3d00404095e9ba73e42beaf123074be 100644
--- a/content/renderer/media/media_stream_video_source_unittest.cc
+++ b/content/renderer/media/media_stream_video_source_unittest.cc
@@ -77,10 +77,10 @@ class MediaStreamVideoSourceTest
blink::WebMediaStreamTrack track = CreateTrack("123", constraints);
mock_source_->CompleteGetSupportedFormats();
- const media::VideoCaptureParams& format = mock_source()->start_params();
- EXPECT_EQ(expected_width, format.requested_format.frame_size.width());
- EXPECT_EQ(expected_height, format.requested_format.frame_size.height());
- EXPECT_EQ(expected_frame_rate, format.requested_format.frame_rate);
+ const media::VideoCaptureFormat& format = mock_source()->start_format();
+ EXPECT_EQ(expected_width, format.frame_size.width());
+ EXPECT_EQ(expected_height, format.frame_size.height());
+ EXPECT_EQ(expected_frame_rate, format.frame_rate);
EXPECT_EQ(0, NumberOfSuccessConstraintsCallbacks());
mock_source_->StartMockedSource();
@@ -424,10 +424,10 @@ TEST_F(MediaStreamVideoSourceTest, OptionalAspectRatioTooHigh) {
"123", factory.CreateWebMediaConstraints());
mock_source()->CompleteGetSupportedFormats();
- const media::VideoCaptureParams& params = mock_source()->start_params();
+ const media::VideoCaptureFormat& format = mock_source()->start_format();
double aspect_ratio =
- static_cast<double>(params.requested_format.frame_size.width()) /
- params.requested_format.frame_size.height();
+ static_cast<double>(format.frame_size.width()) /
+ format.frame_size.height();
EXPECT_LT(aspect_ratio, 2);
}
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | content/renderer/media/mock_media_stream_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698