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

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

Issue 313023003: Oilpan: Replace RefPtrs to Document in core/{accessibility,animation,fetch} with Oilpan transition … (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
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/AnimationStack.h" 6 #include "core/animation/AnimationStack.h"
7 7
8 #include "core/animation/ActiveAnimations.h" 8 #include "core/animation/ActiveAnimations.h"
9 #include "core/animation/AnimatableDouble.h" 9 #include "core/animation/AnimatableDouble.h"
10 #include "core/animation/AnimationClock.h" 10 #include "core/animation/AnimationClock.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 timing.fillMode = Timing::FillModeBoth; 69 timing.fillMode = Timing::FillModeBoth;
70 timing.iterationDuration = duration; 70 timing.iterationDuration = duration;
71 return Animation::create(element.get(), effect, timing); 71 return Animation::create(element.get(), effect, timing);
72 } 72 }
73 73
74 AnimatableValue* interpolationValue(Interpolation* interpolation) 74 AnimatableValue* interpolationValue(Interpolation* interpolation)
75 { 75 {
76 return toLegacyStyleInterpolation(interpolation)->currentValue().get(); 76 return toLegacyStyleInterpolation(interpolation)->currentValue().get();
77 } 77 }
78 78
79 RefPtr<Document> document; 79 RefPtrWillBePersistent<Document> document;
80 RefPtrWillBePersistent<AnimationTimeline> timeline; 80 RefPtrWillBePersistent<AnimationTimeline> timeline;
81 RefPtrWillBePersistent<Element> element; 81 RefPtrWillBePersistent<Element> element;
82 }; 82 };
83 83
84 TEST_F(AnimationAnimationStackTest, ActiveAnimationsSorted) 84 TEST_F(AnimationAnimationStackTest, ActiveAnimationsSorted)
85 { 85 {
86 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(1))).get(), 10); 86 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(1))).get(), 10);
87 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(2))).get(), 15); 87 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(2))).get(), 15);
88 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(3))).get(), 5); 88 play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble ::create(3))).get(), 5);
89 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStac k(), 0, 0, Animation::DefaultPriority, 0); 89 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStac k(), 0, 0, Animation::DefaultPriority, 0);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 updateTimeline(17); 155 updateTimeline(17);
156 Heap::collectAllGarbage(); 156 Heap::collectAllGarbage();
157 interpolations = AnimationStack::activeInterpolations(&element->activeAnimat ions()->defaultStack(), 0, 0, Animation::DefaultPriority, 0); 157 interpolations = AnimationStack::activeInterpolations(&element->activeAnimat ions()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
158 EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equ als(AnimatableDouble::create(2).get())); 158 EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equ als(AnimatableDouble::create(2).get()));
159 EXPECT_EQ(1u, effects().size()); 159 EXPECT_EQ(1u, effects().size());
160 EXPECT_EQ(6, effects()[0]->sortInfo().startTime()); 160 EXPECT_EQ(6, effects()[0]->sortInfo().startTime());
161 } 161 }
162 162
163 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698