Index: Source/core/animation/AnimatableStrokeDasharrayListTest.cpp |
diff --git a/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp b/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp |
index 6a2756d25040771c09241881346e7a2c0904890b..14315b96a7d10ca56e6c41322be908e5da0b6457 100644 |
--- a/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp |
+++ b/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp |
@@ -39,21 +39,29 @@ using namespace WebCore; |
namespace { |
+PassRefPtr<SVGLengthList> createSVGLengthList(size_t length) |
+{ |
+ RefPtr<SVGLengthList> list = SVGLengthList::create(); |
+ for (size_t i = 0; i < length; ++i) |
+ list->append(SVGLength::create()); |
+ return list.release(); |
+} |
+ |
TEST(AnimationAnimatableStrokeDasharrayListTest, EqualTo) |
{ |
- Vector<SVGLength> vectorA(4); |
- Vector<SVGLength> vectorB(4); |
- RefPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(vectorA); |
- RefPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(vectorB); |
+ RefPtr<SVGLengthList> svgListA = createSVGLengthList(4); |
+ RefPtr<SVGLengthList> svgListB = createSVGLengthList(4); |
+ RefPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(svgListA); |
+ RefPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(svgListB); |
EXPECT_TRUE(listA->equals(listB.get())); |
TrackExceptionState exceptionState; |
- vectorB[3].newValueSpecifiedUnits(LengthTypePX, 50, exceptionState); |
- listB = AnimatableStrokeDasharrayList::create(vectorB); |
+ svgListB->at(3)->newValueSpecifiedUnits(LengthTypePX, 50); |
+ listB = AnimatableStrokeDasharrayList::create(svgListB); |
EXPECT_FALSE(listA->equals(listB.get())); |
- vectorB = Vector<SVGLength>(5); |
- listB = AnimatableStrokeDasharrayList::create(vectorB); |
+ svgListB = createSVGLengthList(5); |
+ listB = AnimatableStrokeDasharrayList::create(svgListB); |
EXPECT_FALSE(listA->equals(listB.get())); |
} |