| Index: third_party/WebKit/Source/core/animation/EffectInputTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/EffectInputTest.cpp b/third_party/WebKit/Source/core/animation/EffectInputTest.cpp
|
| index 32cf30f7d9349743cd4aa48b2196d1b04f9f3528..115ba9f5dd6040d25e5614409c92798d6a77251f 100644
|
| --- a/third_party/WebKit/Source/core/animation/EffectInputTest.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/EffectInputTest.cpp
|
| @@ -19,13 +19,6 @@
|
|
|
| namespace blink {
|
|
|
| -Element* appendElement(Document& document)
|
| -{
|
| - Element* element = document.createElement("foo", ASSERT_NO_EXCEPTION);
|
| - document.documentElement()->appendChild(element);
|
| - return element;
|
| -}
|
| -
|
| TEST(AnimationEffectInputTest, SortedOffsets)
|
| {
|
| V8TestingScope scope;
|
| @@ -41,8 +34,7 @@ TEST(AnimationEffectInputTest, SortedOffsets)
|
| jsKeyframes.append(Dictionary(keyframe1, scope.isolate(), scope.getExceptionState()));
|
| jsKeyframes.append(Dictionary(keyframe2, scope.isolate(), scope.getExceptionState()));
|
|
|
| - Element* element = appendElement(scope.document());
|
| - EffectModel* animationEffect = EffectInput::convert(element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| + EffectModel* animationEffect = EffectInput::convert(scope.document(), EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| EXPECT_FALSE(scope.getExceptionState().hadException());
|
| const KeyframeEffectModelBase& keyframeEffect = *toKeyframeEffectModelBase(animationEffect);
|
| EXPECT_EQ(1.0, keyframeEffect.getFrames()[1]->offset());
|
| @@ -63,8 +55,7 @@ TEST(AnimationEffectInputTest, UnsortedOffsets)
|
| jsKeyframes.append(Dictionary(keyframe1, scope.isolate(), scope.getExceptionState()));
|
| jsKeyframes.append(Dictionary(keyframe2, scope.isolate(), scope.getExceptionState()));
|
|
|
| - Element* element = appendElement(scope.document());
|
| - EffectInput::convert(element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| + EffectInput::convert(scope.document(), EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| EXPECT_TRUE(scope.getExceptionState().hadException());
|
| EXPECT_EQ(V8TypeError, scope.getExceptionState().code());
|
| }
|
| @@ -87,8 +78,7 @@ TEST(AnimationEffectInputTest, LooslySorted)
|
| jsKeyframes.append(Dictionary(keyframe2, scope.isolate(), scope.getExceptionState()));
|
| jsKeyframes.append(Dictionary(keyframe3, scope.isolate(), scope.getExceptionState()));
|
|
|
| - Element* element = appendElement(scope.document());
|
| - EffectModel* animationEffect = EffectInput::convert(element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| + EffectModel* animationEffect = EffectInput::convert(scope.document(), EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| EXPECT_FALSE(scope.getExceptionState().hadException());
|
| const KeyframeEffectModelBase& keyframeEffect = *toKeyframeEffectModelBase(animationEffect);
|
| EXPECT_EQ(1, keyframeEffect.getFrames()[2]->offset());
|
| @@ -116,8 +106,7 @@ TEST(AnimationEffectInputTest, OutOfOrderWithNullOffsets)
|
| jsKeyframes.append(Dictionary(keyframe3, scope.isolate(), scope.getExceptionState()));
|
| jsKeyframes.append(Dictionary(keyframe4, scope.isolate(), scope.getExceptionState()));
|
|
|
| - Element* element = appendElement(scope.document());
|
| - EffectInput::convert(element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| + EffectInput::convert(scope.document(), EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| EXPECT_TRUE(scope.getExceptionState().hadException());
|
| }
|
|
|
| @@ -140,8 +129,7 @@ TEST(AnimationEffectInputTest, Invalid)
|
| jsKeyframes.append(Dictionary(keyframe2, scope.isolate(), scope.getExceptionState()));
|
| jsKeyframes.append(Dictionary(keyframe3, scope.isolate(), scope.getExceptionState()));
|
|
|
| - Element* element = appendElement(scope.document());
|
| - EffectInput::convert(element, EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| + EffectInput::convert(scope.document(), EffectModelOrDictionarySequenceOrDictionary::fromDictionarySequence(jsKeyframes), nullptr, scope.getExceptionState());
|
| EXPECT_TRUE(scope.getExceptionState().hadException());
|
| EXPECT_EQ(V8TypeError, scope.getExceptionState().code());
|
| }
|
|
|