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

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

Issue 1854543002: Oilpan: Remove WillBe types (part 7) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 "core/animation/AnimationStack.h" 5 #include "core/animation/AnimationStack.h"
6 6
7 #include "core/animation/AnimationClock.h" 7 #include "core/animation/AnimationClock.h"
8 #include "core/animation/AnimationTimeline.h" 8 #include "core/animation/AnimationTimeline.h"
9 #include "core/animation/ElementAnimations.h" 9 #include "core/animation/ElementAnimations.h"
10 #include "core/animation/KeyframeEffectModel.h" 10 #include "core/animation/KeyframeEffectModel.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return KeyframeEffect::create(element.get(), effect, timing); 72 return KeyframeEffect::create(element.get(), effect, timing);
73 } 73 }
74 74
75 AnimatableValue* interpolationValue(const ActiveInterpolationsMap& activeInt erpolations, CSSPropertyID id) 75 AnimatableValue* interpolationValue(const ActiveInterpolationsMap& activeInt erpolations, CSSPropertyID id)
76 { 76 {
77 Interpolation& interpolation = *activeInterpolations.get(PropertyHandle( id)).at(0); 77 Interpolation& interpolation = *activeInterpolations.get(PropertyHandle( id)).at(0);
78 return toLegacyStyleInterpolation(interpolation).currentValue().get(); 78 return toLegacyStyleInterpolation(interpolation).currentValue().get();
79 } 79 }
80 80
81 OwnPtr<DummyPageHolder> pageHolder; 81 OwnPtr<DummyPageHolder> pageHolder;
82 RefPtrWillBePersistent<Document> document; 82 Persistent<Document> document;
83 Persistent<AnimationTimeline> timeline; 83 Persistent<AnimationTimeline> timeline;
84 RefPtrWillBePersistent<Element> element; 84 Persistent<Element> element;
85 }; 85 };
86 86
87 TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted) 87 TEST_F(AnimationAnimationStackTest, ElementAnimationsSorted)
88 { 88 {
89 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(1))), 10); 89 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(1))), 10);
90 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(2))), 15); 90 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(2))), 15);
91 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(3))), 5); 91 play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize, AnimatableDoubl e::create(3))), 5);
92 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority ); 92 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority );
93 EXPECT_EQ(1u, result.size()); 93 EXPECT_EQ(1u, result.size());
94 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(3).get())); 94 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(3).get()));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 updateTimeline(17); 164 updateTimeline(17);
165 Heap::collectAllGarbage(); 165 Heap::collectAllGarbage();
166 interpolations = AnimationStack::activeInterpolations(&element->elementAnima tions()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority); 166 interpolations = AnimationStack::activeInterpolations(&element->elementAnima tions()->animationStack(), nullptr, nullptr, KeyframeEffect::DefaultPriority);
167 EXPECT_EQ(1u, interpolations.size()); 167 EXPECT_EQ(1u, interpolations.size());
168 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals( AnimatableDouble::create(3).get())); 168 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)->equals( AnimatableDouble::create(3).get()));
169 EXPECT_EQ(1u, sampledEffectCount()); 169 EXPECT_EQ(1u, sampledEffectCount());
170 } 170 }
171 171
172 } // namespace blink 172 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698