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

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

Issue 1226293002: Fix virtual/override/final usage in Source/core/{animation,css,style}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/InterpolableValue.h" 6 #include "core/animation/InterpolableValue.h"
7 7
8 #include "core/animation/Interpolation.h" 8 #include "core/animation/Interpolation.h"
9 #include "core/animation/PropertyHandle.h" 9 #include "core/animation/PropertyHandle.h"
10 10
11 #include <gtest/gtest.h> 11 #include <gtest/gtest.h>
12 12
13 namespace blink { 13 namespace blink {
14 14
15 namespace { 15 namespace {
16 16
17 class SampleInterpolation : public Interpolation { 17 class SampleInterpolation : public Interpolation {
18 public: 18 public:
19 static PassRefPtrWillBeRawPtr<Interpolation> create(PassOwnPtrWillBeRawPtr<I nterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end) 19 static PassRefPtrWillBeRawPtr<Interpolation> create(PassOwnPtrWillBeRawPtr<I nterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end)
20 { 20 {
21 return adoptRefWillBeNoop(new SampleInterpolation(start, end)); 21 return adoptRefWillBeNoop(new SampleInterpolation(start, end));
22 } 22 }
23 23
24 virtual PropertyHandle property() const override 24 PropertyHandle property() const override
25 { 25 {
26 return PropertyHandle(CSSPropertyBackgroundColor); 26 return PropertyHandle(CSSPropertyBackgroundColor);
27 } 27 }
28 private: 28 private:
29 SampleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwn PtrWillBeRawPtr<InterpolableValue> end) 29 SampleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwn PtrWillBeRawPtr<InterpolableValue> end)
30 : Interpolation(start, end) 30 : Interpolation(start, end)
31 { 31 {
32 } 32 }
33 }; 33 };
34 34
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 listB->set(1, InterpolableNumber::create(-10)); 269 listB->set(1, InterpolableNumber::create(-10));
270 listB->set(2, InterpolableNumber::create(9)); 270 listB->set(2, InterpolableNumber::create(9));
271 271
272 OwnPtrWillBeRawPtr<InterpolableList> resultB = multiplyList(0, listB.release ()); 272 OwnPtrWillBeRawPtr<InterpolableList> resultB = multiplyList(0, listB.release ());
273 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(0))->value()); 273 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(0))->value());
274 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(1))->value()); 274 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(1))->value());
275 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(2))->value()); 275 EXPECT_FLOAT_EQ(0, toInterpolableNumber(resultB->get(2))->value());
276 } 276 }
277 277
278 } 278 }
OLDNEW
« no previous file with comments | « Source/core/animation/InterpolableValue.h ('k') | Source/core/animation/InterpolationEffectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698