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 "config.h" | 5 #include "config.h" |
6 #include "core/animation/KeyframeEffect.h" | 6 #include "core/animation/KeyframeEffect.h" |
7 | 7 |
8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "bindings/core/v8/UnionTypesCore.h" | 9 #include "bindings/core/v8/UnionTypesCore.h" |
10 #include "bindings/core/v8/V8BindingForTesting.h" | 10 #include "bindings/core/v8/V8BindingForTesting.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace blink { | 24 namespace blink { |
25 | 25 |
26 class KeyframeEffectTest : public ::testing::Test { | 26 class KeyframeEffectTest : public ::testing::Test { |
27 protected: | 27 protected: |
28 KeyframeEffectTest() | 28 KeyframeEffectTest() |
29 : pageHolder(DummyPageHolder::create()) | 29 : pageHolder(DummyPageHolder::create()) |
30 , document(pageHolder->document()) | 30 , document(pageHolder->document()) |
31 , element(document.createElement("foo", ASSERT_NO_EXCEPTION)) | 31 , element(document.createElement("foo", ASSERT_NO_EXCEPTION)) |
32 { | 32 { |
33 document.animationClock().resetTimeForTesting(document.timeline().zeroTi
me()); | 33 document.animationClock().resetTimeForTesting(document.timeline().zeroTi
me()); |
34 document.documentElement()->appendChild(element); | 34 document.documentElement()->appendChild(element.get()); |
35 EXPECT_EQ(0, document.timeline().currentTime()); | 35 EXPECT_EQ(0, document.timeline().currentTime()); |
36 } | 36 } |
37 | 37 |
38 OwnPtr<DummyPageHolder> pageHolder; | 38 OwnPtr<DummyPageHolder> pageHolder; |
39 Document& document; | 39 Document& document; |
40 RefPtrWillBePersistent<Element> element; | 40 RefPtrWillBePersistent<Element> element; |
41 TrackExceptionState exceptionState; | 41 TrackExceptionState exceptionState; |
42 }; | 42 }; |
43 | 43 |
44 class AnimationKeyframeEffectV8Test : public KeyframeEffectTest { | 44 class AnimationKeyframeEffectV8Test : public KeyframeEffectTest { |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 EXPECT_EQ(element.get(), animation->target()); | 456 EXPECT_EQ(element.get(), animation->target()); |
457 document.timeline().play(animation.get()); | 457 document.timeline().play(animation.get()); |
458 pageHolder.clear(); | 458 pageHolder.clear(); |
459 element.clear(); | 459 element.clear(); |
460 #if !ENABLE(OILPAN) | 460 #if !ENABLE(OILPAN) |
461 EXPECT_EQ(0, animation->target()); | 461 EXPECT_EQ(0, animation->target()); |
462 #endif | 462 #endif |
463 } | 463 } |
464 | 464 |
465 } // namespace blink | 465 } // namespace blink |
OLD | NEW |