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

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

Issue 27572003: Fix assert failure in AnimatableStrokeDasharrayList::equalTo() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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/AnimatableRepeatable.h ('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/AnimatableStrokeDasharrayListTest.cpp
diff --git a/Source/core/animation/AnimatableNeutralTest.cpp b/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp
similarity index 67%
copy from Source/core/animation/AnimatableNeutralTest.cpp
copy to Source/core/animation/AnimatableStrokeDasharrayListTest.cpp
index cfa7a84852384d8d63f2c5f18e8d8b7e8e0cdf58..b688075c1bf8eabbe178f20c61153db5c5b6ff0e 100644
--- a/Source/core/animation/AnimatableNeutralTest.cpp
+++ b/Source/core/animation/AnimatableStrokeDasharrayListTest.cpp
@@ -29,10 +29,9 @@
*/
#include "config.h"
-#include "core/animation/AnimatableNeutral.h"
+#include "core/animation/AnimatableStrokeDasharrayList.h"
-#include "core/animation/AnimatableUnknown.h"
-#include "core/css/CSSArrayFunctionValue.h"
+#include "core/svg/SVGLength.h"
#include <gtest/gtest.h>
@@ -40,18 +39,22 @@ using namespace WebCore;
namespace {
-TEST(CoreAnimationAnimatableNeutralTest, Create)
+TEST(CoreAnimationAnimatableStrokeDasharrayListTest, EqualTo)
{
- EXPECT_TRUE(AnimatableValue::neutralValue());
+ Vector<SVGLength> vectorA(4);
+ Vector<SVGLength> vectorB(4);
+ RefPtr<AnimatableStrokeDasharrayList> listA = AnimatableStrokeDasharrayList::create(vectorA);
+ RefPtr<AnimatableStrokeDasharrayList> listB = AnimatableStrokeDasharrayList::create(vectorB);
+ EXPECT_TRUE(listA->equals(listB.get()));
+
+ TrackExceptionState es;
+ vectorB[3].newValueSpecifiedUnits(LengthTypePX, 50, es);
+ listB = AnimatableStrokeDasharrayList::create(vectorB);
+ EXPECT_FALSE(listA->equals(listB.get()));
+
+ vectorB = Vector<SVGLength>(5);
+ listB = AnimatableStrokeDasharrayList::create(vectorB);
+ EXPECT_FALSE(listA->equals(listB.get()));
}
-TEST(CoreAnimationAnimatableNeutralTest, Add)
-{
- RefPtr<CSSValue> cssValue = CSSArrayFunctionValue::create();
- RefPtr<AnimatableValue> animatableUnknown = AnimatableUnknown::create(cssValue);
-
- EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::add(animatableUnknown.get(), AnimatableValue::neutralValue()).get())->toCSSValue());
- EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::add(AnimatableValue::neutralValue(), animatableUnknown.get()).get())->toCSSValue());
-}
-
-}
+} // namespace
« no previous file with comments | « Source/core/animation/AnimatableRepeatable.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698