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

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

Issue 1276183004: Oilpan: Unship oilpan from temporary animation objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/ShadowStyleInterpolation.h" 6 #include "core/animation/ShadowStyleInterpolation.h"
7 7
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/css/CSSShadowValue.h" 9 #include "core/css/CSSShadowValue.h"
10 #include "core/css/CSSValue.h" 10 #include "core/css/CSSValue.h"
11 #include "core/css/resolver/StyleBuilder.h" 11 #include "core/css/resolver/StyleBuilder.h"
12 #include "platform/graphics/Color.h" 12 #include "platform/graphics/Color.h"
13 13
14 #include <gtest/gtest.h> 14 #include <gtest/gtest.h>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class AnimationShadowStyleInterpolationTest : public ::testing::Test { 18 class AnimationShadowStyleInterpolationTest : public ::testing::Test {
19 19
20 protected: 20 protected:
21 21
22 static PassOwnPtrWillBeRawPtr<InterpolableValue> shadowToInterpolableValue(c onst CSSValue& value, bool styleFlag) 22 static PassOwnPtr<InterpolableValue> shadowToInterpolableValue(const CSSValu e& value, bool styleFlag)
23 { 23 {
24 return ShadowStyleInterpolation::shadowToInterpolableValue(value, styleF lag); 24 return ShadowStyleInterpolation::shadowToInterpolableValue(value, styleF lag);
25 } 25 }
26 26
27 static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToShadow(Interpolab leValue* value, bool styleFlag) 27 static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToShadow(Interpolab leValue* value, bool styleFlag)
28 { 28 {
29 return ShadowStyleInterpolation::interpolableValueToShadow(*value, style Flag); 29 return ShadowStyleInterpolation::interpolableValueToShadow(*value, style Flag);
30 } 30 }
31 31
32 static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSS Value> value, bool styleFlag) 32 static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSS Value> value, bool styleFlag)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = CSSPrimitiveValue::create(40, CSSPrimitiveValue::UnitType::Pixels); 96 RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = CSSPrimitiveValue::create(40, CSSPrimitiveValue::UnitType::Pixels);
97 97
98 RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = CSSShadowValue::create(x, y , blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueInset), color); 98 RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = CSSShadowValue::create(x, y , blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueInset), color);
99 99
100 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(shadowValue.release(), true); 100 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(shadowValue.release(), true);
101 101
102 testPrimitiveValues(value, 10, 20, 30, 40, makeRGBA(54, 48, 214, 64), CSSPri mitiveValue::createIdentifier(CSSValueInset), CSSPrimitiveValue::UnitType::Pixel s); 102 testPrimitiveValues(value, 10, 20, 30, 40, makeRGBA(54, 48, 214, 64), CSSPri mitiveValue::createIdentifier(CSSValueInset), CSSPrimitiveValue::UnitType::Pixel s);
103 } 103 }
104 104
105 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698