| Index: third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| index 00f2c285efb5956c335491dc6a8e525d5d9f22c7..249bf018e1a4b02f628cf4d59ba4eb84559dd864 100644
|
| --- a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| @@ -44,13 +44,13 @@ protected:
|
| class AnimationKeyframeEffectV8Test : public KeyframeEffectTest {
|
| protected:
|
| template<typename T>
|
| - static KeyframeEffect* createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput, ExceptionState& exceptionState)
|
| + static KeyframeEffect* createAnimation(Document& document, Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput, ExceptionState& exceptionState)
|
| {
|
| - return KeyframeEffect::create(nullptr, element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(keyframeDictionaryVector), timingInput, exceptionState);
|
| + return KeyframeEffect::create(&document, element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(keyframeDictionaryVector), timingInput, exceptionState);
|
| }
|
| - static KeyframeEffect* createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, ExceptionState& exceptionState)
|
| + static KeyframeEffect* createAnimation(Document& document, Element* element, Vector<Dictionary> keyframeDictionaryVector, ExceptionState& exceptionState)
|
| {
|
| - return KeyframeEffect::create(nullptr, element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(keyframeDictionaryVector), exceptionState);
|
| + return KeyframeEffect::create(&document, element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(keyframeDictionaryVector), exceptionState);
|
| }
|
| };
|
|
|
| @@ -79,7 +79,7 @@ TEST_F(AnimationKeyframeEffectV8Test, CanCreateAnAnimation)
|
| ASSERT_TRUE(DictionaryHelper::get(jsKeyframes[1], "width", value2));
|
| ASSERT_EQ("0px", value2);
|
|
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| Element* target = animation->target();
|
| EXPECT_EQ(*element.get(), *target);
|
| @@ -106,7 +106,7 @@ TEST_F(AnimationKeyframeEffectV8Test, CanSetDuration)
|
| Vector<Dictionary, 0> jsKeyframes;
|
| double duration = 2000;
|
|
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, duration, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, duration, exceptionState);
|
|
|
| EXPECT_EQ(duration / 1000, animation->specifiedTiming().iterationDuration);
|
| }
|
| @@ -114,7 +114,7 @@ TEST_F(AnimationKeyframeEffectV8Test, CanSetDuration)
|
| TEST_F(AnimationKeyframeEffectV8Test, CanOmitSpecifiedDuration)
|
| {
|
| Vector<Dictionary, 0> jsKeyframes;
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, exceptionState);
|
| EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration));
|
| }
|
|
|
| @@ -135,7 +135,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedGetters)
|
| KeyframeEffectOptions timingInputDictionary;
|
| V8KeyframeEffectOptions::toImpl(scope.isolate(), timingInput, timingInputDictionary, exceptionState);
|
|
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| AnimationEffectTiming* specified = animation->timing();
|
| EXPECT_EQ(2, specified->delay());
|
| @@ -158,7 +158,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedDurationGetter)
|
| KeyframeEffectOptions timingInputDictionaryWithDuration;
|
| V8KeyframeEffectOptions::toImpl(scope.isolate(), timingInputWithDuration, timingInputDictionaryWithDuration, exceptionState);
|
|
|
| - KeyframeEffect* animationWithDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryWithDuration, exceptionState);
|
| + KeyframeEffect* animationWithDuration = createAnimation(document(), element.get(), jsKeyframes, timingInputDictionaryWithDuration, exceptionState);
|
|
|
| AnimationEffectTiming* specifiedWithDuration = animationWithDuration->timing();
|
| UnrestrictedDoubleOrString duration;
|
| @@ -172,7 +172,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedDurationGetter)
|
| KeyframeEffectOptions timingInputDictionaryNoDuration;
|
| V8KeyframeEffectOptions::toImpl(scope.isolate(), timingInputNoDuration, timingInputDictionaryNoDuration, exceptionState);
|
|
|
| - KeyframeEffect* animationNoDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryNoDuration, exceptionState);
|
| + KeyframeEffect* animationNoDuration = createAnimation(document(), element.get(), jsKeyframes, timingInputDictionaryNoDuration, exceptionState);
|
|
|
| AnimationEffectTiming* specifiedNoDuration = animationNoDuration->timing();
|
| UnrestrictedDoubleOrString duration2;
|
| @@ -189,7 +189,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedSetters)
|
| v8::Local<v8::Object> timingInput = v8::Object::New(scope.isolate());
|
| KeyframeEffectOptions timingInputDictionary;
|
| V8KeyframeEffectOptions::toImpl(scope.isolate(), timingInput, timingInputDictionary, exceptionState);
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| AnimationEffectTiming* specified = animation->timing();
|
|
|
| @@ -224,7 +224,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SpecifiedSetters)
|
| EXPECT_EQ("reverse", specified->direction());
|
|
|
| EXPECT_EQ("linear", specified->easing());
|
| - specified->setEasing("step-start", exceptionState);
|
| + specified->setEasing(&document(), "step-start", exceptionState);
|
| ASSERT_FALSE(exceptionState.hadException());
|
| EXPECT_EQ("step-start", specified->easing());
|
| }
|
| @@ -236,7 +236,7 @@ TEST_F(AnimationKeyframeEffectV8Test, SetSpecifiedDuration)
|
| v8::Local<v8::Object> timingInput = v8::Object::New(scope.isolate());
|
| KeyframeEffectOptions timingInputDictionary;
|
| V8KeyframeEffectOptions::toImpl(scope.isolate(), timingInput, timingInputDictionary, exceptionState);
|
| - KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + KeyframeEffect* animation = createAnimation(document(), element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| AnimationEffectTiming* specified = animation->timing();
|
|
|
|
|