| Index: third_party/WebKit/Source/core/animation/TimingInputTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/TimingInputTest.cpp b/third_party/WebKit/Source/core/animation/TimingInputTest.cpp
|
| index 6e3934c483a9f1aecf3a3ce4c1b06c288a123f4d..2e67755ce4f1c34ef694a35a94a6af03b32badd3 100644
|
| --- a/third_party/WebKit/Source/core/animation/TimingInputTest.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/TimingInputTest.cpp
|
| @@ -53,41 +53,51 @@ Timing applyTimingInputString(v8::Isolate* isolate,
|
| TEST(AnimationTimingInputTest, TimingInputStartDelay) {
|
| V8TestingScope scope;
|
| bool ignoredSuccess;
|
| - EXPECT_EQ(1.1, applyTimingInputNumber(scope.isolate(), "delay", 1100,
|
| - ignoredSuccess)
|
| - .startDelay);
|
| - EXPECT_EQ(-1, applyTimingInputNumber(scope.isolate(), "delay", -1000,
|
| - ignoredSuccess)
|
| - .startDelay);
|
| - EXPECT_EQ(1, applyTimingInputString(scope.isolate(), "delay", "1000",
|
| - ignoredSuccess)
|
| - .startDelay);
|
| EXPECT_EQ(
|
| - 0, applyTimingInputString(scope.isolate(), "delay", "1s", ignoredSuccess)
|
| - .startDelay);
|
| - EXPECT_EQ(0, applyTimingInputString(scope.isolate(), "delay", "Infinity",
|
| - ignoredSuccess)
|
| - .startDelay);
|
| - EXPECT_EQ(0, applyTimingInputString(scope.isolate(), "delay", "-Infinity",
|
| - ignoredSuccess)
|
| - .startDelay);
|
| + 1.1,
|
| + applyTimingInputNumber(scope.isolate(), "delay", 1100, ignoredSuccess)
|
| + .startDelay);
|
| EXPECT_EQ(
|
| - 0, applyTimingInputString(scope.isolate(), "delay", "NaN", ignoredSuccess)
|
| - .startDelay);
|
| - EXPECT_EQ(0, applyTimingInputString(scope.isolate(), "delay", "rubbish",
|
| - ignoredSuccess)
|
| - .startDelay);
|
| + -1,
|
| + applyTimingInputNumber(scope.isolate(), "delay", -1000, ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(
|
| + 1,
|
| + applyTimingInputString(scope.isolate(), "delay", "1000", ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(
|
| + 0,
|
| + applyTimingInputString(scope.isolate(), "delay", "1s", ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(0,
|
| + applyTimingInputString(scope.isolate(), "delay", "Infinity",
|
| + ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(0,
|
| + applyTimingInputString(scope.isolate(), "delay", "-Infinity",
|
| + ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(
|
| + 0,
|
| + applyTimingInputString(scope.isolate(), "delay", "NaN", ignoredSuccess)
|
| + .startDelay);
|
| + EXPECT_EQ(0,
|
| + applyTimingInputString(scope.isolate(), "delay", "rubbish",
|
| + ignoredSuccess)
|
| + .startDelay);
|
| }
|
|
|
| TEST(AnimationTimingInputTest, TimingInputEndDelay) {
|
| V8TestingScope scope;
|
| bool ignoredSuccess;
|
| - EXPECT_EQ(10, applyTimingInputNumber(scope.isolate(), "endDelay", 10000,
|
| - ignoredSuccess)
|
| - .endDelay);
|
| - EXPECT_EQ(-2.5, applyTimingInputNumber(scope.isolate(), "endDelay", -2500,
|
| - ignoredSuccess)
|
| - .endDelay);
|
| + EXPECT_EQ(
|
| + 10,
|
| + applyTimingInputNumber(scope.isolate(), "endDelay", 10000, ignoredSuccess)
|
| + .endDelay);
|
| + EXPECT_EQ(
|
| + -2.5,
|
| + applyTimingInputNumber(scope.isolate(), "endDelay", -2500, ignoredSuccess)
|
| + .endDelay);
|
| }
|
|
|
| TEST(AnimationTimingInputTest, TimingInputFillMode) {
|
| @@ -131,9 +141,10 @@ TEST(AnimationTimingInputTest, TimingInputFillMode) {
|
| TEST(AnimationTimingInputTest, TimingInputIterationStart) {
|
| V8TestingScope scope;
|
| bool success;
|
| - EXPECT_EQ(1.1, applyTimingInputNumber(scope.isolate(), "iterationStart", 1.1,
|
| - success)
|
| - .iterationStart);
|
| + EXPECT_EQ(
|
| + 1.1,
|
| + applyTimingInputNumber(scope.isolate(), "iterationStart", 1.1, success)
|
| + .iterationStart);
|
| EXPECT_TRUE(success);
|
|
|
| applyTimingInputNumber(scope.isolate(), "iterationStart", -1, success);
|
|
|