| 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/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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 void TearDown() override | 28 void TearDown() override |
| 29 { | 29 { |
| 30 document.release(); | 30 document.release(); |
| 31 #if ENABLE(OILPAN) | 31 #if ENABLE(OILPAN) |
| 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 Persistent<Document> document; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) | 40 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) |
| 41 { | 41 { |
| 42 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); | 42 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); |
| 43 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); | 43 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); |
| 44 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width")); | 44 EXPECT_EQ(CSSPropertyWidth, keyframeAttributeToCSSProperty("width")); |
| 45 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float")); | 45 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("float")); |
| 46 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat")); | 46 EXPECT_EQ(CSSPropertyFloat, keyframeAttributeToCSSProperty("cssFloat")); |
| 47 | 47 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |