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

Unified Diff: Source/core/animation/AnimatableValueTestHelperTest.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
« no previous file with comments | « Source/core/animation/AnimatableValueTestHelper.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableValueTestHelperTest.cpp
diff --git a/Source/core/animation/AnimatableValueTestHelperTest.cpp b/Source/core/animation/AnimatableValueTestHelperTest.cpp
index fad1a5a55e478b32fc569e125b2fd7baef3c7598..58364214d81c503e02ccb381f3718a13cb6f4ae8 100644
--- a/Source/core/animation/AnimatableValueTestHelperTest.cpp
+++ b/Source/core/animation/AnimatableValueTestHelperTest.cpp
@@ -114,9 +114,14 @@ TEST_F(AnimationAnimatableValueTestHelperTest, PrintTo)
::std::string("AnimatableRepeatable(AnimatableLength(3rem), AnimatableLength(4pt))"),
PrintToString(AnimatableRepeatable::create(v1)));
+ RefPtr<SVGLength> length1cm = SVGLength::create(LengthModeOther);
+ RefPtr<SVGLength> length2cm = SVGLength::create(LengthModeOther);
+ length1cm->setValueAsString("1cm", ASSERT_NO_EXCEPTION);
+ length2cm->setValueAsString("2cm", ASSERT_NO_EXCEPTION);
+
EXPECT_EQ(
::std::string("AnimatableSVGLength(1cm)"),
- PrintToString(AnimatableSVGLength::create(SVGLength(LengthModeOther, "1cm"))));
+ PrintToString(AnimatableSVGLength::create(length1cm)));
EXPECT_EQ(
::std::string("AnimatableSVGPaint(#ff0000)"),
@@ -130,12 +135,12 @@ TEST_F(AnimationAnimatableValueTestHelperTest, PrintTo)
PrintToString(AnimatableShapeValue::create(ShapeValue::createShapeValue(BasicShapeCircle::create().get()).get())),
testing::StartsWith("AnimatableShapeValue@"));
- Vector<SVGLength> v2;
- v2.append(SVGLength(LengthModeOther, "1cm"));
- v2.append(SVGLength(LengthModeOther, "2cm"));
+ RefPtr<SVGLengthList> l2 = SVGLengthList::create();
+ l2->append(length1cm);
+ l2->append(length2cm);
EXPECT_EQ(
::std::string("AnimatableStrokeDasharrayList(1cm, 2cm)"),
- PrintToString(AnimatableStrokeDasharrayList::create(v2)));
+ PrintToString(AnimatableStrokeDasharrayList::create(l2)));
TransformOperations operations1;
operations1.operations().append(TranslateTransformOperation::create(Length(2, WebCore::Fixed), Length(0, WebCore::Fixed), TransformOperation::TranslateX));
« no previous file with comments | « Source/core/animation/AnimatableValueTestHelper.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698