Index: Source/core/animation/AnimationTest.cpp |
diff --git a/Source/core/animation/AnimationTest.cpp b/Source/core/animation/AnimationTest.cpp |
index beaae605149f07786aca0f6cc05fe5247f832345..497f93c42b8fd027549c1a806fc8812a0857f227 100644 |
--- a/Source/core/animation/AnimationTest.cpp |
+++ b/Source/core/animation/AnimationTest.cpp |
@@ -12,6 +12,7 @@ |
#include "core/animation/AnimationTestHelper.h" |
#include "core/animation/DocumentTimeline.h" |
#include "core/animation/KeyframeEffectModel.h" |
+#include "core/animation/Timing.h" |
#include "platform/animation/TimingFunctionTestHelper.h" |
#include <gtest/gtest.h> |
@@ -43,25 +44,20 @@ protected: |
{ |
} |
- v8::Isolate* isolate; |
- v8::HandleScope scope; |
- v8::Local<v8::Context> context; |
- v8::Context::Scope contextScope; |
- |
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, Dictionary timingInput) |
+ template<typename T> |
+ static PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput) |
{ |
- return Animation::createUnsafe(element, keyframeDictionaryVector, timingInput); |
+ return Animation::create(element, EffectInput::convert(element, keyframeDictionaryVector, true), timingInput); |
} |
- |
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, double timingInput) |
+ static PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector) |
{ |
- return Animation::createUnsafe(element, keyframeDictionaryVector, timingInput); |
+ return Animation::create(element, EffectInput::convert(element, keyframeDictionaryVector, true)); |
} |
- PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector) |
- { |
- return Animation::createUnsafe(element, keyframeDictionaryVector); |
- } |
+ v8::Isolate* isolate; |
+ v8::HandleScope scope; |
+ v8::Local<v8::Context> context; |
+ v8::Context::Scope contextScope; |
}; |
TEST_F(AnimationAnimationV8Test, CanCreateAnAnimation) |
@@ -131,11 +127,11 @@ TEST_F(AnimationAnimationV8Test, CanOmitSpecifiedDuration) |
EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration)); |
} |
-TEST_F(AnimationAnimationV8Test, ClipNegativeDurationToZero) |
+TEST_F(AnimationAnimationV8Test, NegativeDurationIsAuto) |
{ |
Vector<Dictionary, 0> jsKeyframes; |
RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, -2); |
- EXPECT_EQ(0, animation->specifiedTiming().iterationDuration); |
+ EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration)); |
} |
TEST_F(AnimationAnimationV8Test, SpecifiedGetters) |