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

Unified Diff: Source/core/animation/ListStyleInterpolationTest.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/ListStyleInterpolationTest.cpp
diff --git a/Source/core/animation/ListStyleInterpolationTest.cpp b/Source/core/animation/ListStyleInterpolationTest.cpp
index 357e1c79463941be43be3b18c36b5a87271edae5..7ab7642dcc8565cf7fbc60ba378da589e29dc19e 100644
--- a/Source/core/animation/ListStyleInterpolationTest.cpp
+++ b/Source/core/animation/ListStyleInterpolationTest.cpp
@@ -15,32 +15,32 @@ namespace blink {
class ListStyleInterpolationTest : public ::testing::Test {
protected:
- static PassRefPtrWillBeRawPtr<CSSValue> lengthRoundTrip(PassRefPtrWillBeRawPtr<CSSValue> value, InterpolationRange range)
+ static CSSValue lengthRoundTrip(CSSValue value, InterpolationRange range)
{
return ListStyleInterpolationImpl<LengthStyleInterpolation, void>::interpolableValueToList(
- ListStyleInterpolationImpl<LengthStyleInterpolation, void>::listToInterpolableValue(*value).get(), range);
+ ListStyleInterpolationImpl<LengthStyleInterpolation, void>::listToInterpolableValue(toCSSValueList(value)).get(), range);
}
- static void compareLengthLists(PassRefPtrWillBeRawPtr<CSSValueList> expectedList, PassRefPtrWillBeRawPtr<CSSValue> actualList)
+ static void compareLengthLists(PassRefPtrWillBeRawPtr<CSSValueList> expectedList, CSSValue actualList)
{
- ASSERT(actualList->isValueList());
+ ASSERT(actualList.isValueList());
for (size_t i = 0; i < 10; i++) {
- CSSValue* currentExpectedValue = expectedList->item(i);
- CSSValue* currentActualValue = toCSSValueList(*actualList).item(i);
- ASSERT(currentExpectedValue->isPrimitiveValue());
- ASSERT(currentActualValue->isPrimitiveValue());
+ CSSValue currentExpectedValue = expectedList->item(i);
+ CSSValue currentActualValue = toCSSValueList(actualList).item(i);
+ ASSERT(currentExpectedValue.isPrimitiveValue());
+ ASSERT(currentActualValue.isPrimitiveValue());
- EXPECT_EQ(toCSSPrimitiveValue(currentExpectedValue)->getDoubleValue(), toCSSPrimitiveValue(currentActualValue)->getDoubleValue());
- EXPECT_EQ(toCSSPrimitiveValue(currentExpectedValue)->getDoubleValue(), toCSSPrimitiveValue(currentActualValue)->getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(currentExpectedValue).getDoubleValue(), toCSSPrimitiveValue(currentActualValue).getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(currentExpectedValue).getDoubleValue(), toCSSPrimitiveValue(currentActualValue).getDoubleValue());
}
}
- static PassRefPtrWillBeRawPtr<CSSValue> shadowRoundTrip(PassRefPtrWillBeRawPtr<CSSValue> value)
+ static CSSValue shadowRoundTrip(CSSValue value)
{
Vector<bool> nonInterpolableData;
return ListStyleInterpolationImpl<ShadowStyleInterpolation, bool>::interpolableValueToList(
- ListStyleInterpolationImpl<ShadowStyleInterpolation, bool>::listToInterpolableValue(*value, &nonInterpolableData).get(), nonInterpolableData);
+ ListStyleInterpolationImpl<ShadowStyleInterpolation, bool>::listToInterpolableValue(toCSSValueList(value), &nonInterpolableData).get(), nonInterpolableData);
}
static RefPtrWillBeRawPtr<CSSShadowValue> createShadowValue()
@@ -55,22 +55,22 @@ protected:
}
- static void compareShadowList(RefPtrWillBeRawPtr<CSSValueList> expectedList, RefPtrWillBeRawPtr<CSSValue> actualList)
+ static void compareShadowList(RefPtrWillBeRawPtr<CSSValueList> expectedList, CSSValue actualList)
{
- ASSERT(actualList->isValueList());
+ ASSERT(actualList.isValueList());
for (size_t i = 0; i < 10; i++) {
- CSSShadowValue* expectedShadow = toCSSShadowValue(expectedList->item(i));
- CSSShadowValue* actualShadow = toCSSShadowValue(toCSSValueList(*actualList).item(i));
+ CSSShadowValue& expectedShadow = toCSSShadowValue(expectedList->item(i));
+ CSSShadowValue& actualShadow = toCSSShadowValue(toCSSValueList(actualList).item(i));
- EXPECT_EQ(expectedShadow->x->getDoubleValue(), actualShadow->x->getDoubleValue());
- EXPECT_EQ(expectedShadow->y->getDoubleValue(), actualShadow->y->getDoubleValue());
- EXPECT_EQ(expectedShadow->blur->getDoubleValue(), actualShadow->blur->getDoubleValue());
- EXPECT_EQ(expectedShadow->spread->getDoubleValue(), actualShadow->spread->getDoubleValue());
- EXPECT_EQ(expectedShadow->color->getRGBA32Value(), actualShadow->color->getRGBA32Value());
+ EXPECT_EQ(expectedShadow.x->getDoubleValue(), actualShadow.x->getDoubleValue());
+ EXPECT_EQ(expectedShadow.y->getDoubleValue(), actualShadow.y->getDoubleValue());
+ EXPECT_EQ(expectedShadow.blur->getDoubleValue(), actualShadow.blur->getDoubleValue());
+ EXPECT_EQ(expectedShadow.spread->getDoubleValue(), actualShadow.spread->getDoubleValue());
+ EXPECT_EQ(expectedShadow.color->getRGBA32Value(), actualShadow.color->getRGBA32Value());
- EXPECT_EQ(expectedShadow->style->getValueID(), actualShadow->style->getValueID());
+ EXPECT_EQ(expectedShadow.style->getValueID(), actualShadow.style->getValueID());
}
}
};
« no previous file with comments | « Source/core/animation/ListStyleInterpolation.h ('k') | Source/core/animation/SVGStrokeDasharrayStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698