| OLD | NEW |
| 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/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/testing/DummyPageHolder.h" | 9 #include "core/testing/DummyPageHolder.h" |
| 10 #include "platform/animation/TimingFunction.h" | 10 #include "platform/animation/TimingFunction.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 Persistent<Document> document; | 62 Persistent<Document> document; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) | 65 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) |
| 66 { | 66 { |
| 67 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); | 67 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); |
| 68 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); | 68 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); |
| 69 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width")); | 69 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width")); |
| 70 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float")); | 70 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float")); |
| 71 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat")); | 71 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat")); |
| 72 EXPECT_EQ(CSSPropertyVariable, keyframeAttributeToCSSProperty("--")); |
| 73 EXPECT_EQ(CSSPropertyVariable, keyframeAttributeToCSSProperty("---")); |
| 74 EXPECT_EQ(CSSPropertyVariable, keyframeAttributeToCSSProperty("--x")); |
| 75 EXPECT_EQ(CSSPropertyVariable, keyframeAttributeToCSSProperty("--webkit-cust
om-property")); |
| 72 | 76 |
| 77 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("")); |
| 78 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-")); |
| 73 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("line-height"))
; | 79 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("line-height"))
; |
| 74 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("border-topWidt
h")); | 80 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("border-topWidt
h")); |
| 75 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("Width")); | 81 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("Width")); |
| 76 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-epub-text-tra
nsform")); | 82 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-epub-text-tra
nsform")); |
| 77 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("EpubTextTransf
orm")); | 83 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("EpubTextTransf
orm")); |
| 78 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-internal-marq
uee-repetition")); | 84 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-internal-marq
uee-repetition")); |
| 79 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("InternalMarque
eRepetition")); | 85 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("InternalMarque
eRepetition")); |
| 80 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-filter
")); | 86 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-filter
")); |
| 81 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-transf
orm")); | 87 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("-webkit-transf
orm")); |
| 82 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("webkitTransfor
m")); | 88 EXPECT_EQ(CSSPropertyInvalid, keyframeAttributeToCSSProperty("webkitTransfor
m")); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 105 EXPECT_EQ("steps(3, middle)", parseTimingFunction("steps(3, middle)", except
ionState)->toString()); | 111 EXPECT_EQ("steps(3, middle)", parseTimingFunction("steps(3, middle)", except
ionState)->toString()); |
| 106 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3, end)", exceptionState)->
toString()); | 112 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3, end)", exceptionState)->
toString()); |
| 107 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3)", exceptionState)->toStr
ing()); | 113 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3)", exceptionState)->toStr
ing()); |
| 108 | 114 |
| 109 timingFunctionThrows("steps(3, nowhere)", exceptionState); | 115 timingFunctionThrows("steps(3, nowhere)", exceptionState); |
| 110 timingFunctionThrows("steps(-3, end)", exceptionState); | 116 timingFunctionThrows("steps(-3, end)", exceptionState); |
| 111 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); | 117 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); |
| 112 } | 118 } |
| 113 | 119 |
| 114 } // namespace blink | 120 } // namespace blink |
| OLD | NEW |