| Index: Source/core/animation/AnimationTest.cpp
|
| diff --git a/Source/core/animation/AnimationTest.cpp b/Source/core/animation/AnimationTest.cpp
|
| index 9cc726b1b90a5e2dc2b89ee3ebf18784fc3c2d76..c344a6f951c04e3b98fd5f986e9f854c2d54af58 100644
|
| --- a/Source/core/animation/AnimationTest.cpp
|
| +++ b/Source/core/animation/AnimationTest.cpp
|
| @@ -44,11 +44,11 @@ protected:
|
| }
|
|
|
| template<typename T>
|
| - static PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput, ExceptionState& exceptionState)
|
| + static PassRefPtrWillBeRawPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, T timingInput, ExceptionState& exceptionState)
|
| {
|
| return Animation::create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState, true), timingInput);
|
| }
|
| - static PassRefPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, ExceptionState& exceptionState)
|
| + static PassRefPtrWillBeRawPtr<Animation> createAnimation(Element* element, Vector<Dictionary> keyframeDictionaryVector, ExceptionState& exceptionState)
|
| {
|
| return Animation::create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState, true));
|
| }
|
| @@ -83,7 +83,7 @@ TEST_F(AnimationAnimationV8Test, CanCreateAnAnimation)
|
| ASSERT_TRUE(jsKeyframes[1].get("width", value2));
|
| ASSERT_EQ("0px", value2);
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| Element* target = animation->target();
|
| EXPECT_EQ(*element.get(), *target);
|
| @@ -110,7 +110,7 @@ TEST_F(AnimationAnimationV8Test, CanSetDuration)
|
| Vector<Dictionary, 0> jsKeyframes;
|
| double duration = 2;
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, duration, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, duration, exceptionState);
|
|
|
| EXPECT_EQ(duration, animation->specifiedTiming().iterationDuration);
|
| }
|
| @@ -118,14 +118,14 @@ TEST_F(AnimationAnimationV8Test, CanSetDuration)
|
| TEST_F(AnimationAnimationV8Test, CanOmitSpecifiedDuration)
|
| {
|
| Vector<Dictionary, 0> jsKeyframes;
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, exceptionState);
|
| EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration));
|
| }
|
|
|
| TEST_F(AnimationAnimationV8Test, NegativeDurationIsAuto)
|
| {
|
| Vector<Dictionary, 0> jsKeyframes;
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, -2, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, -2, exceptionState);
|
| EXPECT_TRUE(std::isnan(animation->specifiedTiming().iterationDuration));
|
| }
|
|
|
| @@ -146,7 +146,7 @@ TEST_F(AnimationAnimationV8Test, MismatchedKeyframePropertyRaisesException)
|
| jsKeyframes.append(Dictionary(keyframe1, m_isolate));
|
| jsKeyframes.append(Dictionary(keyframe2, m_isolate));
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| EXPECT_TRUE(exceptionState.hadException());
|
| EXPECT_EQ(NotSupportedError, exceptionState.code());
|
| @@ -166,7 +166,7 @@ TEST_F(AnimationAnimationV8Test, MissingOffsetZeroRaisesException)
|
| jsKeyframes.append(Dictionary(keyframe1, m_isolate));
|
| jsKeyframes.append(Dictionary(keyframe2, m_isolate));
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| EXPECT_TRUE(exceptionState.hadException());
|
| EXPECT_EQ(NotSupportedError, exceptionState.code());
|
| @@ -186,7 +186,7 @@ TEST_F(AnimationAnimationV8Test, MissingOffsetOneRaisesException)
|
| jsKeyframes.append(Dictionary(keyframe1, m_isolate));
|
| jsKeyframes.append(Dictionary(keyframe2, m_isolate));
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| EXPECT_TRUE(exceptionState.hadException());
|
| EXPECT_EQ(NotSupportedError, exceptionState.code());
|
| @@ -206,7 +206,7 @@ TEST_F(AnimationAnimationV8Test, MissingOffsetZeroAndOneRaisesException)
|
| jsKeyframes.append(Dictionary(keyframe1, m_isolate));
|
| jsKeyframes.append(Dictionary(keyframe2, m_isolate));
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, 0, exceptionState);
|
|
|
| EXPECT_TRUE(exceptionState.hadException());
|
| EXPECT_EQ(NotSupportedError, exceptionState.code());
|
| @@ -227,9 +227,9 @@ TEST_F(AnimationAnimationV8Test, SpecifiedGetters)
|
| setV8ObjectPropertyAsString(timingInput, "easing", "step-start");
|
| Dictionary timingInputDictionary = Dictionary(v8::Handle<v8::Value>::Cast(timingInput), m_isolate);
|
|
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| - RefPtr<TimedItemTiming> specified = animation->specified();
|
| + RefPtrWillBeRawPtr<TimedItemTiming> specified = animation->specified();
|
| EXPECT_EQ(2, specified->delay());
|
| EXPECT_EQ(0.5, specified->endDelay());
|
| EXPECT_EQ("backwards", specified->fill());
|
| @@ -248,9 +248,9 @@ TEST_F(AnimationAnimationV8Test, SpecifiedDurationGetter)
|
| setV8ObjectPropertyAsNumber(timingInputWithDuration, "duration", 2.5);
|
| Dictionary timingInputDictionaryWithDuration = Dictionary(v8::Handle<v8::Value>::Cast(timingInputWithDuration), m_isolate);
|
|
|
| - RefPtr<Animation> animationWithDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryWithDuration, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animationWithDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryWithDuration, exceptionState);
|
|
|
| - RefPtr<TimedItemTiming> specifiedWithDuration = animationWithDuration->specified();
|
| + RefPtrWillBeRawPtr<TimedItemTiming> specifiedWithDuration = animationWithDuration->specified();
|
| bool isNumber = false;
|
| double numberDuration = std::numeric_limits<double>::quiet_NaN();
|
| bool isString = false;
|
| @@ -265,9 +265,9 @@ TEST_F(AnimationAnimationV8Test, SpecifiedDurationGetter)
|
| v8::Handle<v8::Object> timingInputNoDuration = v8::Object::New(m_isolate);
|
| Dictionary timingInputDictionaryNoDuration = Dictionary(v8::Handle<v8::Value>::Cast(timingInputNoDuration), m_isolate);
|
|
|
| - RefPtr<Animation> animationNoDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryNoDuration, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animationNoDuration = createAnimation(element.get(), jsKeyframes, timingInputDictionaryNoDuration, exceptionState);
|
|
|
| - RefPtr<TimedItemTiming> specifiedNoDuration = animationNoDuration->specified();
|
| + RefPtrWillBeRawPtr<TimedItemTiming> specifiedNoDuration = animationNoDuration->specified();
|
| isNumber = false;
|
| numberDuration = std::numeric_limits<double>::quiet_NaN();
|
| isString = false;
|
| @@ -284,9 +284,9 @@ TEST_F(AnimationAnimationV8Test, SpecifiedSetters)
|
| Vector<Dictionary, 0> jsKeyframes;
|
| v8::Handle<v8::Object> timingInput = v8::Object::New(m_isolate);
|
| Dictionary timingInputDictionary = Dictionary(v8::Handle<v8::Value>::Cast(timingInput), m_isolate);
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| - RefPtr<TimedItemTiming> specified = animation->specified();
|
| + RefPtrWillBeRawPtr<TimedItemTiming> specified = animation->specified();
|
|
|
| EXPECT_EQ(0, specified->delay());
|
| specified->setDelay(2);
|
| @@ -326,9 +326,9 @@ TEST_F(AnimationAnimationV8Test, SetSpecifiedDuration)
|
| Vector<Dictionary, 0> jsKeyframes;
|
| v8::Handle<v8::Object> timingInput = v8::Object::New(m_isolate);
|
| Dictionary timingInputDictionary = Dictionary(v8::Handle<v8::Value>::Cast(timingInput), m_isolate);
|
| - RefPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
| + RefPtrWillBeRawPtr<Animation> animation = createAnimation(element.get(), jsKeyframes, timingInputDictionary, exceptionState);
|
|
|
| - RefPtr<TimedItemTiming> specified = animation->specified();
|
| + RefPtrWillBeRawPtr<TimedItemTiming> specified = animation->specified();
|
|
|
| bool isNumber = false;
|
| double numberDuration = std::numeric_limits<double>::quiet_NaN();
|
| @@ -359,8 +359,8 @@ TEST_F(AnimationAnimationTest, TimeToEffectChange)
|
| timing.startDelay = 100;
|
| timing.endDelay = 100;
|
| timing.fillMode = Timing::FillModeNone;
|
| - RefPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| - RefPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| + RefPtrWillBeRawPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| + RefPtrWillBeRawPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
| @@ -392,8 +392,8 @@ TEST_F(AnimationAnimationTest, TimeToEffectChangeWithPlaybackRate)
|
| timing.endDelay = 100;
|
| timing.playbackRate = 2;
|
| timing.fillMode = Timing::FillModeNone;
|
| - RefPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| - RefPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| + RefPtrWillBeRawPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| + RefPtrWillBeRawPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
| @@ -425,8 +425,8 @@ TEST_F(AnimationAnimationTest, TimeToEffectChangeWithNegativePlaybackRate)
|
| timing.endDelay = 100;
|
| timing.playbackRate = -2;
|
| timing.fillMode = Timing::FillModeNone;
|
| - RefPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| - RefPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| + RefPtrWillBeRawPtr<Animation> animation = Animation::create(nullptr, nullptr, timing);
|
| + RefPtrWillBeRawPtr<AnimationPlayer> player = document->timeline().play(animation.get());
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
|
|