| Index: third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp b/third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp
|
| index cca25cf831039054eca40b9946b8f21499e98e04..3d238c71f4dd5acc3917e21c755ee1a8007a0362 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp
|
| @@ -17,4 +17,16 @@ TEST(StepRangeTest, ClampValueWithOutStepMatchedValue)
|
| EXPECT_EQ(Decimal(0), stepRange.clampValue(Decimal(-100)));
|
| }
|
|
|
| +TEST(StepRangeTest, StepSnappedMaximum)
|
| +{
|
| + // <input type=number value="1110" max=100 step="20">
|
| + StepRange stepRange(Decimal::fromDouble(1110), Decimal(0), Decimal(100), true, Decimal(20), StepRange::StepDescription());
|
| + EXPECT_EQ(Decimal(90), stepRange.stepSnappedMaximum());
|
| +
|
| + // crbug.com/617809
|
| + // <input type=number value="8624024784918570374158793713225864658725102756338798521486349461900449498315865014065406918592181034633618363349807887404915072776534917803019477033072906290735591367789665757384135591225430117374220731087966" min=0 max=100 step="18446744073709551575">
|
| + StepRange stepRange2(Decimal::fromDouble(8.62402e+207), Decimal(0), Decimal(100), true, Decimal::fromDouble(1.84467e+19), StepRange::StepDescription());
|
| + EXPECT_FALSE(stepRange2.stepSnappedMaximum().isFinite());
|
| +}
|
| +
|
| } // namespace blink
|
|
|