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 2776243005: Fix constants in constraints util tests. (Closed)
Patch Set: Created 3 years, 9 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_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 212391efec04811a3328df62ac93e983c305fb07..7274578b322776c5afb6cd9edefbc1441198ecf1 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
@@ -888,7 +888,7 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealAspectRatio) {
constraint_factory_.basic().height.setMax(500);
constraint_factory_.basic().width.setMin(100);
constraint_factory_.basic().width.setMax(500);
- const int kIdealAspectRatio = 2.0;
+ const double kIdealAspectRatio = 2.0;
constraint_factory_.basic().aspectRatio.setIdeal(kIdealAspectRatio);
auto result = SelectSettings();
EXPECT_TRUE(result.HasValue());
@@ -1009,7 +1009,7 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealAspectRatio) {
TEST_F(MediaStreamConstraintsUtilVideoContentTest, MandatoryExactFrameRate) {
constraint_factory_.Reset();
- const int kFrameRate = 45.0;
+ const double kFrameRate = 45.0;
constraint_factory_.basic().frameRate.setExact(kFrameRate);
auto result = SelectSettings();
EXPECT_TRUE(result.HasValue());
@@ -1098,7 +1098,7 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealFrameRate) {
// Unconstrained.
{
constraint_factory_.Reset();
- const int kIdealFrameRate = 45.0;
+ const double kIdealFrameRate = 45.0;
constraint_factory_.basic().frameRate.setIdeal(kIdealFrameRate);
auto result = SelectSettings();
EXPECT_TRUE(result.HasValue());
@@ -1109,8 +1109,8 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealFrameRate) {
// Ideal greater than maximum.
{
constraint_factory_.Reset();
- const int kIdealFrameRate = 45.0;
- const int kMaxFrameRate = 30.0;
+ const double kIdealFrameRate = 45.0;
+ const double kMaxFrameRate = 30.0;
constraint_factory_.basic().frameRate.setIdeal(kIdealFrameRate);
constraint_factory_.basic().frameRate.setMax(kMaxFrameRate);
auto result = SelectSettings();
@@ -1122,8 +1122,8 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealFrameRate) {
// Ideal less than minimum.
{
constraint_factory_.Reset();
- const int kIdealFrameRate = 45.0;
- const int kMinFrameRate = 50.0;
+ const double kIdealFrameRate = 45.0;
+ const double kMinFrameRate = 50.0;
constraint_factory_.basic().frameRate.setIdeal(kIdealFrameRate);
constraint_factory_.basic().frameRate.setMin(kMinFrameRate);
auto result = SelectSettings();
@@ -1135,9 +1135,9 @@ TEST_F(MediaStreamConstraintsUtilVideoContentTest, IdealFrameRate) {
// Ideal within range.
{
constraint_factory_.Reset();
- const int kIdealFrameRate = 45.0;
- const int kMinFrameRate = 35.0;
- const int kMaxFrameRate = 50.0;
+ const double kIdealFrameRate = 45.0;
+ const double kMinFrameRate = 35.0;
+ const double kMaxFrameRate = 50.0;
constraint_factory_.basic().frameRate.setIdeal(kIdealFrameRate);
constraint_factory_.basic().frameRate.setMin(kMinFrameRate);
constraint_factory_.basic().frameRate.setMax(kMaxFrameRate);

Powered by Google App Engine
This is Rietveld 408576698