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

Unified Diff: Source/core/animation/ShadowStyleInterpolationTest.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/ShadowStyleInterpolation.cpp ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ShadowStyleInterpolationTest.cpp
diff --git a/Source/core/animation/ShadowStyleInterpolationTest.cpp b/Source/core/animation/ShadowStyleInterpolationTest.cpp
index 6eca4d3e85bf38d4f137bf603ad110595602638a..80e5d240c1a3b319213fbc0d65b96c973fda1748 100644
--- a/Source/core/animation/ShadowStyleInterpolationTest.cpp
+++ b/Source/core/animation/ShadowStyleInterpolationTest.cpp
@@ -24,22 +24,22 @@ protected:
return ShadowStyleInterpolation::shadowToInterpolableValue(value, styleFlag);
}
- static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToShadow(InterpolableValue* value, bool styleFlag)
+ static CSSValue interpolableValueToShadow(InterpolableValue* value, bool styleFlag)
{
return ShadowStyleInterpolation::interpolableValueToShadow(*value, styleFlag);
}
- static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSSValue> value, bool styleFlag)
+ static CSSValue roundTrip(CSSValue value, bool styleFlag)
{
- return interpolableValueToShadow(shadowToInterpolableValue(*value, styleFlag).get(), styleFlag);
+ return interpolableValueToShadow(shadowToInterpolableValue(value, styleFlag).get(), styleFlag);
}
- static void testPrimitiveValues(RefPtrWillBeRawPtr<CSSValue> value, double xExpected, double yExpected, double blurExpected, double spreadExpected,
+ static void testPrimitiveValues(CSSValue value, double xExpected, double yExpected, double blurExpected, double spreadExpected,
RGBA32 colorExpected, RefPtrWillBeRawPtr<CSSPrimitiveValue> idExpected, CSSPrimitiveValue::UnitType unitType)
{
- EXPECT_TRUE(value->isShadowValue());
+ EXPECT_TRUE(value.isShadowValue());
- CSSShadowValue& shadowValue = toCSSShadowValue(*value);
+ CSSShadowValue& shadowValue = toCSSShadowValue(value);
EXPECT_EQ(xExpected, shadowValue.x->getDoubleValue());
EXPECT_EQ(yExpected, shadowValue.y->getDoubleValue());
@@ -67,7 +67,7 @@ TEST_F(AnimationShadowStyleInterpolationTest, ZeroTest)
RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = CSSShadowValue::create(x, y, blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueNone), color);
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(shadowValue.release(), false);
+ CSSValue value = roundTrip(shadowValue.release(), false);
testPrimitiveValues(value, 0, 0, 0, 0, makeRGBA(0, 0, 0, 0), CSSPrimitiveValue::createIdentifier(CSSValueNone), CSSPrimitiveValue::CSS_PX);
}
@@ -82,7 +82,7 @@ TEST_F(AnimationShadowStyleInterpolationTest, MultipleValueNonPixelTest)
RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = CSSShadowValue::create(x, y, blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueNone), color);
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(shadowValue.release(), false);
+ CSSValue value = roundTrip(shadowValue.release(), false);
testPrimitiveValues(value, 10, 20, 30, 40, makeRGBA(112, 123, 175, 255), CSSPrimitiveValue::createIdentifier(CSSValueNone), CSSPrimitiveValue::CSS_EMS);
}
@@ -97,7 +97,7 @@ TEST_F(AnimationShadowStyleInterpolationTest, InsetShadowTest)
RefPtrWillBeRawPtr<CSSShadowValue> shadowValue = CSSShadowValue::create(x, y, blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueInset), color);
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(shadowValue.release(), true);
+ CSSValue value = roundTrip(shadowValue.release(), true);
testPrimitiveValues(value, 10, 20, 30, 40, makeRGBA(54, 48, 214, 64), CSSPrimitiveValue::createIdentifier(CSSValueInset), CSSPrimitiveValue::CSS_PX);
}
« no previous file with comments | « Source/core/animation/ShadowStyleInterpolation.cpp ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698