Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: Source/core/animation/AnimationTest.cpp

Issue 717003002: Animations: Allow document animation timelines to have a playback rate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/Animation.h" 6 #include "core/animation/Animation.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 "core/animation/AnimationClock.h" 10 #include "core/animation/AnimationClock.h"
(...skipping 10 matching lines...) Expand all
21 namespace blink { 21 namespace blink {
22 22
23 class AnimationAnimationTest : public ::testing::Test { 23 class AnimationAnimationTest : public ::testing::Test {
24 protected: 24 protected:
25 AnimationAnimationTest() 25 AnimationAnimationTest()
26 : pageHolder(DummyPageHolder::create()) 26 : pageHolder(DummyPageHolder::create())
27 , document(pageHolder->document()) 27 , document(pageHolder->document())
28 , element(document.createElement("foo", ASSERT_NO_EXCEPTION)) 28 , element(document.createElement("foo", ASSERT_NO_EXCEPTION))
29 { 29 {
30 document.animationClock().resetTimeForTesting(document.timeline().zeroTi me()); 30 document.animationClock().resetTimeForTesting(document.timeline().zeroTi me());
31
dstockwell 2014/11/12 03:39:42 Remove stray blank line.
samli 2014/11/12 20:01:13 Done.
31 EXPECT_EQ(0, document.timeline().currentTime()); 32 EXPECT_EQ(0, document.timeline().currentTime());
32 } 33 }
33 34
34 OwnPtr<DummyPageHolder> pageHolder; 35 OwnPtr<DummyPageHolder> pageHolder;
35 Document& document; 36 Document& document;
36 RefPtrWillBePersistent<Element> element; 37 RefPtrWillBePersistent<Element> element;
37 TrackExceptionState exceptionState; 38 TrackExceptionState exceptionState;
38 }; 39 };
39 40
40 class AnimationAnimationV8Test : public AnimationAnimationTest { 41 class AnimationAnimationV8Test : public AnimationAnimationTest {
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 EXPECT_EQ(element.get(), animation->target()); 446 EXPECT_EQ(element.get(), animation->target());
446 document.timeline().play(animation.get()); 447 document.timeline().play(animation.get());
447 pageHolder.clear(); 448 pageHolder.clear();
448 element.clear(); 449 element.clear();
449 #if !ENABLE(OILPAN) 450 #if !ENABLE(OILPAN)
450 EXPECT_EQ(0, animation->target()); 451 EXPECT_EQ(0, animation->target());
451 #endif 452 #endif
452 } 453 }
453 454
454 } // namespace blink 455 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimationTimeline.h » ('j') | Source/core/animation/AnimationTimeline.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698