Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: Source/core/animation/AnimatableStrokeDasharrayListTest.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()));
}
« no previous file with comments | « Source/core/animation/AnimatableStrokeDasharrayList.cpp ('k') | Source/core/animation/AnimatableValueTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698