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

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

Issue 1780603002: blink: Rename bindings/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-bindings: rebase Created 4 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/InterpolationEffect.h" 5 #include "core/animation/InterpolationEffect.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 namespace { 11 namespace {
12 12
13 class SampleInterpolation : public Interpolation { 13 class SampleInterpolation : public Interpolation {
14 public: 14 public:
15 static PassRefPtr<Interpolation> create(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end) 15 static PassRefPtr<Interpolation> create(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end)
16 { 16 {
17 return adoptRef(new SampleInterpolation(std::move(start), std::move(end) )); 17 return adoptRef(new SampleInterpolation(std::move(start), std::move(end) ));
18 } 18 }
19 19
20 PropertyHandle property() const override 20 PropertyHandle getProperty() const override
21 { 21 {
22 return PropertyHandle(CSSPropertyBackgroundColor); 22 return PropertyHandle(CSSPropertyBackgroundColor);
23 } 23 }
24 private: 24 private:
25 SampleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Interpol ableValue> end) 25 SampleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Interpol ableValue> end)
26 : Interpolation(std::move(start), std::move(end)) 26 : Interpolation(std::move(start), std::move(end))
27 { 27 {
28 } 28 }
29 }; 29 };
30 30
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 interpolationEffect.getActiveInterpolations(1.5, duration, activeInterpolati ons); 107 interpolationEffect.getActiveInterpolations(1.5, duration, activeInterpolati ons);
108 EXPECT_EQ(1ul, activeInterpolations.size()); 108 EXPECT_EQ(1ul, activeInterpolations.size());
109 EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations.at(0))); 109 EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations.at(0)));
110 110
111 interpolationEffect.getActiveInterpolations(2, duration, activeInterpolation s); 111 interpolationEffect.getActiveInterpolations(2, duration, activeInterpolation s);
112 EXPECT_EQ(1ul, activeInterpolations.size()); 112 EXPECT_EQ(1ul, activeInterpolations.size());
113 EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0))); 113 EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0)));
114 } 114 }
115 115
116 } // namespace blink 116 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/Interpolation.h ('k') | third_party/WebKit/Source/core/animation/InterpolationType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698