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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationInputHelpersTest.cpp

Issue 1771733002: Web Animations: Use of hyphens is no longer supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid Windows Release failure Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/AnimationInputHelpers.h" 5 #include "core/animation/AnimationInputHelpers.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/testing/DummyPageHolder.h" 8 #include "core/testing/DummyPageHolder.h"
9 #include "platform/animation/TimingFunction.h" 9 #include "platform/animation/TimingFunction.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 21 matching lines...) Expand all
32 Heap::collectAllGarbage(); 32 Heap::collectAllGarbage();
33 #endif 33 #endif
34 } 34 }
35 35
36 OwnPtr<DummyPageHolder> pageHolder; 36 OwnPtr<DummyPageHolder> pageHolder;
37 RefPtrWillBePersistent<Document> document; 37 RefPtrWillBePersistent<Document> document;
38 }; 38 };
39 39
40 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) 40 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes)
41 { 41 {
42 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("line-height "));
43 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight" )); 42 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight" ));
44 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT opWidth")); 43 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT opWidth"));
45 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("border- topWidth"));
46 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width")); 44 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width"));
47 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float")); 45 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float"));
48 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat")); 46 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat"));
49 47
48 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("line-height")) ;
49 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("border-topWidt h"));
50 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("Width")); 50 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("Width"));
51 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-epub-text-tra nsform")); 51 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-epub-text-tra nsform"));
52 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("EpubTextTransf orm")); 52 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("EpubTextTransf orm"));
53 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-internal-marq uee-repetition")); 53 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-internal-marq uee-repetition"));
54 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("InternalMarque eRepetition")); 54 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("InternalMarque eRepetition"));
55 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-filter ")); 55 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-filter "));
56 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-transf orm")); 56 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-transf orm"));
57 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("webkitTransfor m")); 57 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("webkitTransfor m"));
58 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("WebkitTransfor m")); 58 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("WebkitTransfor m"));
59 } 59 }
(...skipping 24 matching lines...) Expand all
84 EXPECT_TRUE(timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)")); 84 EXPECT_TRUE(timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)"));
85 85
86 EXPECT_EQ("steps(3, end)", AnimationInputHelpers::parseTimingFunction("steps (3)")->toString()); 86 EXPECT_EQ("steps(3, end)", AnimationInputHelpers::parseTimingFunction("steps (3)")->toString());
87 87
88 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("steps(3, nowh ere)")); 88 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("steps(3, nowh ere)"));
89 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("steps(-3, end )")); 89 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("steps(-3, end )"));
90 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("cubic-bezier( 0.1, 0, 4, 0.4)")); 90 EXPECT_EQ(nullptr, AnimationInputHelpers::parseTimingFunction("cubic-bezier( 0.1, 0, 4, 0.4)"));
91 } 91 }
92 92
93 } // namespace blink 93 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698