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

Unified Diff: Source/core/animation/LengthBoxStyleInterpolationTest.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
Index: Source/core/animation/LengthBoxStyleInterpolationTest.cpp
diff --git a/Source/core/animation/LengthBoxStyleInterpolationTest.cpp b/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
index 54482feff854ce8aa641fca8296597805128cecf..bdd844ae8b11943f7467d300483d9346559a5e5d 100644
--- a/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
+++ b/Source/core/animation/LengthBoxStyleInterpolationTest.cpp
@@ -21,20 +21,20 @@ protected:
return LengthBoxStyleInterpolation::lengthBoxtoInterpolableValue(value, value, false);
}
- static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthBox(InterpolableValue* value, const CSSValue& start, const CSSValue& end)
+ static CSSValue interpolableValueToLengthBox(InterpolableValue* value, const CSSValue& start, const CSSValue& end)
{
return LengthBoxStyleInterpolation::interpolableValueToLengthBox(value, start, end);
}
- static PassRefPtrWillBeRawPtr<CSSValue> roundTrip(PassRefPtrWillBeRawPtr<CSSValue> value)
+ static CSSValue roundTrip(CSSValue value)
{
- return interpolableValueToLengthBox(lengthBoxToInterpolableValue(*value).get(), *value, *value);
+ return interpolableValueToLengthBox(lengthBoxToInterpolableValue(value).get(), value, value);
}
- static void testPrimitiveValue(RefPtrWillBeRawPtr<CSSValue> value, double left, double right, double top, double bottom, CSSPrimitiveValue::UnitType unitType)
+ static void testPrimitiveValue(CSSValue value, double left, double right, double top, double bottom, CSSPrimitiveValue::UnitType unitType)
{
- EXPECT_TRUE(value->isPrimitiveValue());
- Rect* rect = toCSSPrimitiveValue(value.get())->getRectValue();
+ EXPECT_TRUE(value.isPrimitiveValue());
+ Rect* rect = toCSSPrimitiveValue(value).getRectValue();
EXPECT_EQ(rect->left()->getDoubleValue(), left);
EXPECT_EQ(rect->right()->getDoubleValue(), right);
@@ -55,7 +55,7 @@ TEST_F(AnimationLengthBoxStyleInterpolationTest, ZeroLengthBox)
rectPx->setRight(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX));
rectPx->setTop(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX));
rectPx->setBottom(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX));
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
+ CSSValue value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
testPrimitiveValue(value, 0, 0, 0, 0, CSSPrimitiveValue::CSS_PX);
RefPtrWillBeRawPtr<Rect> rectEms = Rect::create();
@@ -76,7 +76,7 @@ TEST_F(AnimationLengthBoxStyleInterpolationTest, SingleUnitBox)
rectPx->setTop(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_PX));
rectPx->setBottom(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_PX));
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
+ CSSValue value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
testPrimitiveValue(value, 10, 10, 10, 10, CSSPrimitiveValue::CSS_PX);
RefPtrWillBeRawPtr<Rect> rectPer = Rect::create();
@@ -106,7 +106,7 @@ TEST_F(AnimationLengthBoxStyleInterpolationTest, MultipleValues)
rectPx->setTop(CSSPrimitiveValue::create(20, CSSPrimitiveValue::CSS_PX));
rectPx->setBottom(CSSPrimitiveValue::create(40, CSSPrimitiveValue::CSS_PX));
- RefPtrWillBeRawPtr<CSSValue> value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
+ CSSValue value = roundTrip(CSSPrimitiveValue::create(rectPx.release()));
testPrimitiveValue(value, 10, 0, 20, 40, CSSPrimitiveValue::CSS_PX);
RefPtrWillBeRawPtr<Rect> rectPer = Rect::create();
« no previous file with comments | « Source/core/animation/LengthBoxStyleInterpolation.cpp ('k') | Source/core/animation/LengthPairStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698