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

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

Issue 975733002: Use Length for the stroke-dasharray property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test for style-change responsive-ness. Created 5 years, 10 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/animatable/AnimatableStrokeDasharrayListTest.cpp
diff --git a/Source/core/animation/animatable/AnimatableStrokeDasharrayListTest.cpp b/Source/core/animation/animatable/AnimatableStrokeDasharrayListTest.cpp
index 327747defc701866ffeae4ad6cea03bca332765f..f7a2975165d761191286c768e657539e82a312b6 100644
--- a/Source/core/animation/animatable/AnimatableStrokeDasharrayListTest.cpp
+++ b/Source/core/animation/animatable/AnimatableStrokeDasharrayListTest.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "core/animation/animatable/AnimatableStrokeDasharrayList.h"
-#include "core/svg/SVGLength.h"
+#include "core/layout/style/SVGLayoutStyleDefs.h"
#include <gtest/gtest.h>
@@ -39,29 +39,28 @@ using namespace blink;
namespace {
-PassRefPtrWillBeRawPtr<SVGLengthList> createSVGLengthList(size_t length)
+PassRefPtr<SVGDashArray> createSVGDashArray(size_t length)
{
- RefPtrWillBeRawPtr<SVGLengthList> list = SVGLengthList::create();
+ RefPtr<SVGDashArray> list = SVGDashArray::create();
for (size_t i = 0; i < length; ++i)
- list->append(SVGLength::create());
+ list->append(Length(Fixed));
return list.release();
}
TEST(AnimationAnimatableStrokeDasharrayListTest, EqualTo)
{
- RefPtrWillBeRawPtr<SVGLengthList> svgListA = createSVGLengthList(4);
- RefPtrWillBeRawPtr<SVGLengthList> svgListB = createSVGLengthList(4);
- RefPtrWillBeRawPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(svgListA);
- RefPtrWillBeRawPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(svgListB);
+ RefPtr<SVGDashArray> svgListA = createSVGDashArray(4);
+ RefPtr<SVGDashArray> svgListB = createSVGDashArray(4);
+ RefPtrWillBeRawPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(svgListA, 1);
+ RefPtrWillBeRawPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(svgListB, 1);
EXPECT_TRUE(listA->equals(listB.get()));
- TrackExceptionState exceptionState;
- svgListB->at(3)->newValueSpecifiedUnits(LengthTypePX, 50);
- listB = AnimatableStrokeDasharrayList::create(svgListB);
+ svgListB->at(3) = Length(50, Fixed);
+ listB = AnimatableStrokeDasharrayList::create(svgListB, 1);
EXPECT_FALSE(listA->equals(listB.get()));
- svgListB = createSVGLengthList(5);
- listB = AnimatableStrokeDasharrayList::create(svgListB);
+ svgListB = createSVGDashArray(5);
+ listB = AnimatableStrokeDasharrayList::create(svgListB, 1);
EXPECT_FALSE(listA->equals(listB.get()));
}

Powered by Google App Engine
This is Rietveld 408576698