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

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

Issue 2800343005: Update selection of resolution policy for screen capture with getUserMedia. (Closed)
Patch Set: Created 3 years, 8 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 | « content/renderer/media/media_stream_constraints_util_video_content.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_constraints_util_video_content_unittest.cc
diff --git a/content/renderer/media/media_stream_constraints_util_video_content_unittest.cc b/content/renderer/media/media_stream_constraints_util_video_content_unittest.cc
index a105b47591561a3fca96a59c8f158c7bb4fd0faf..d28c8b779e60220be725783002ba2eefa0d336cd 100644
--- a/content/renderer/media/media_stream_constraints_util_video_content_unittest.cc
+++ b/content/renderer/media/media_stream_constraints_util_video_content_unittest.cc
@@ -1969,6 +1969,20 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, ResolutionChangePolicy) {
EXPECT_EQ(1.32, result.track_adapter_settings().max_aspect_ratio);
CheckTrackAdapterSettingsEqualsFormat(result);
}
+ {
+ constraint_factory_.Reset();
+ constraint_factory_.basic().height.SetMax(4000);
+ constraint_factory_.basic().width.SetMax(4000);
+ auto result = SelectSettings();
+ EXPECT_EQ(4000, result.Width());
+ EXPECT_EQ(4000, result.Height());
+ // Only specifying a maximum resolution allows resolution adjustment.
+ EXPECT_EQ(media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT,
+ result.ResolutionChangePolicy());
+ EXPECT_EQ(1.0 / 4000, result.track_adapter_settings().min_aspect_ratio);
+ EXPECT_EQ(4000.0, result.track_adapter_settings().max_aspect_ratio);
+ CheckTrackAdapterSettingsEqualsFormat(result);
+ }
}
} // namespace content
« no previous file with comments | « content/renderer/media/media_stream_constraints_util_video_content.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698