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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 9 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/EffectStack.h" 5 #include "core/animation/EffectStack.h"
6 6
7 #include "core/animation/AnimationClock.h" 7 #include "core/animation/AnimationClock.h"
8 #include "core/animation/CompositorPendingAnimations.h" 8 #include "core/animation/CompositorPendingAnimations.h"
9 #include "core/animation/DocumentTimeline.h" 9 #include "core/animation/DocumentTimeline.h"
10 #include "core/animation/ElementAnimations.h" 10 #include "core/animation/ElementAnimations.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 Timing timing; 69 Timing timing;
70 timing.fillMode = Timing::FillMode::BOTH; 70 timing.fillMode = Timing::FillMode::BOTH;
71 timing.iterationDuration = duration; 71 timing.iterationDuration = duration;
72 return KeyframeEffect::create(element.get(), effect, timing); 72 return KeyframeEffect::create(element.get(), effect, timing);
73 } 73 }
74 74
75 AnimatableValue* interpolationValue( 75 AnimatableValue* interpolationValue(
76 const ActiveInterpolationsMap& activeInterpolations, 76 const ActiveInterpolationsMap& activeInterpolations,
77 CSSPropertyID id) { 77 CSSPropertyID id) {
78 Interpolation& interpolation = 78 Interpolation& interpolation =
79 *activeInterpolations.get(PropertyHandle(id)).at(0); 79 *activeInterpolations.at(PropertyHandle(id)).at(0);
80 return toLegacyStyleInterpolation(interpolation).currentValue().get(); 80 return toLegacyStyleInterpolation(interpolation).currentValue().get();
81 } 81 }
82 82
83 std::unique_ptr<DummyPageHolder> pageHolder; 83 std::unique_ptr<DummyPageHolder> pageHolder;
84 Persistent<Document> document; 84 Persistent<Document> document;
85 Persistent<DocumentTimeline> timeline; 85 Persistent<DocumentTimeline> timeline;
86 Persistent<Element> element; 86 Persistent<Element> element;
87 }; 87 };
88 88
89 TEST_F(AnimationEffectStackTest, ElementAnimationsSorted) { 89 TEST_F(AnimationEffectStackTest, ElementAnimationsSorted) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 interpolations = EffectStack::activeInterpolations( 213 interpolations = EffectStack::activeInterpolations(
214 &element->elementAnimations()->effectStack(), nullptr, nullptr, 214 &element->elementAnimations()->effectStack(), nullptr, nullptr,
215 KeyframeEffectReadOnly::DefaultPriority); 215 KeyframeEffectReadOnly::DefaultPriority);
216 EXPECT_EQ(1u, interpolations.size()); 216 EXPECT_EQ(1u, interpolations.size());
217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) 217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize)
218 ->equals(AnimatableDouble::create(3).get())); 218 ->equals(AnimatableDouble::create(3).get()));
219 EXPECT_EQ(1u, sampledEffectCount()); 219 EXPECT_EQ(1u, sampledEffectCount());
220 } 220 }
221 221
222 } // namespace blink 222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698