| 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 21 matching lines...) Expand all Loading... |
| 32 protected: | 32 protected: |
| 33 void SetUp() override | 33 void SetUp() override |
| 34 { | 34 { |
| 35 pageHolder = DummyPageHolder::create(); | 35 pageHolder = DummyPageHolder::create(); |
| 36 document = &pageHolder->document(); | 36 document = &pageHolder->document(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void TearDown() override | 39 void TearDown() override |
| 40 { | 40 { |
| 41 document.release(); | 41 document.release(); |
| 42 ThreadHeap::collectAllGarbage(); | 42 Heap::collectAllGarbage(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 OwnPtr<DummyPageHolder> pageHolder; | 45 OwnPtr<DummyPageHolder> pageHolder; |
| 46 Persistent<Document> document; | 46 Persistent<Document> document; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) | 49 TEST_F(AnimationAnimationInputHelpersTest, ParseKeyframePropertyAttributes) |
| 50 { | 50 { |
| 51 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); | 51 EXPECT_EQ(CSSPropertyLineHeight, keyframeAttributeToCSSProperty("lineHeight"
)); |
| 52 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); | 52 EXPECT_EQ(CSSPropertyBorderTopWidth, keyframeAttributeToCSSProperty("borderT
opWidth")); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 EXPECT_TRUE(timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)")); | 87 EXPECT_TRUE(timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)")); |
| 88 | 88 |
| 89 EXPECT_EQ("steps(3, end)", parseTimingFunction("steps(3)")->toString()); | 89 EXPECT_EQ("steps(3, end)", parseTimingFunction("steps(3)")->toString()); |
| 90 | 90 |
| 91 EXPECT_EQ(nullptr, parseTimingFunction("steps(3, nowhere)")); | 91 EXPECT_EQ(nullptr, parseTimingFunction("steps(3, nowhere)")); |
| 92 EXPECT_EQ(nullptr, parseTimingFunction("steps(-3, end)")); | 92 EXPECT_EQ(nullptr, parseTimingFunction("steps(-3, end)")); |
| 93 EXPECT_EQ(nullptr, parseTimingFunction("cubic-bezier(0.1, 0, 4, 0.4)")); | 93 EXPECT_EQ(nullptr, parseTimingFunction("cubic-bezier(0.1, 0, 4, 0.4)")); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| OLD | NEW |