| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 protected: | 48 protected: |
| 49 void SetUp() override | 49 void SetUp() override |
| 50 { | 50 { |
| 51 pageHolder = DummyPageHolder::create(); | 51 pageHolder = DummyPageHolder::create(); |
| 52 document = &pageHolder->document(); | 52 document = &pageHolder->document(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void TearDown() override | 55 void TearDown() override |
| 56 { | 56 { |
| 57 document.release(); | 57 document.release(); |
| 58 ThreadHeap::collectAllGarbage(); | 58 ThreadState::current()-> collectAllGarbage(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 std::unique_ptr<DummyPageHolder> pageHolder; | 61 std::unique_ptr<DummyPageHolder> pageHolder; |
| 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")); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState); | 105 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState); |
| 106 | 106 |
| 107 EXPECT_EQ("steps(3, end)", parseTimingFunction("steps(3)", exceptionState)->
toString()); | 107 EXPECT_EQ("steps(3, end)", parseTimingFunction("steps(3)", exceptionState)->
toString()); |
| 108 | 108 |
| 109 timingFunctionThrows("steps(3, nowhere)", exceptionState); | 109 timingFunctionThrows("steps(3, nowhere)", exceptionState); |
| 110 timingFunctionThrows("steps(-3, end)", exceptionState); | 110 timingFunctionThrows("steps(-3, end)", exceptionState); |
| 111 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); | 111 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace blink | 114 } // namespace blink |
| OLD | NEW |