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

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

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
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 7ab7642dcc8565cf7fbc60ba378da589e29dc19e..f78e306c77a546ef84079e90ac1fe1e760f045f7 100644
--- a/Source/core/animation/ListStyleInterpolationTest.cpp
+++ b/Source/core/animation/ListStyleInterpolationTest.cpp
@@ -45,11 +45,11 @@ protected:
static RefPtrWillBeRawPtr<CSSShadowValue> createShadowValue()
{
- RefPtrWillBeRawPtr<CSSPrimitiveValue> color = CSSPrimitiveValue::createColor(makeRGBA(112, 123, 175, 255));
- RefPtrWillBeRawPtr<CSSPrimitiveValue> x = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_PX);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> y = CSSPrimitiveValue::create(20, CSSPrimitiveValue::CSS_PX);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> blur = CSSPrimitiveValue::create(30, CSSPrimitiveValue::CSS_PX);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = CSSPrimitiveValue::create(40, CSSPrimitiveValue::CSS_PX);
+ CSSPrimitiveValue color = CSSPrimitiveValue::createColor(makeRGBA(112, 123, 175, 255));
+ CSSPrimitiveValue x = CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_PX);
+ CSSPrimitiveValue y = CSSPrimitiveValue::create(20, CSSPrimitiveValue::CSS_PX);
+ CSSPrimitiveValue blur = CSSPrimitiveValue::create(30, CSSPrimitiveValue::CSS_PX);
+ CSSPrimitiveValue spread = CSSPrimitiveValue::create(40, CSSPrimitiveValue::CSS_PX);
return CSSShadowValue::create(x, y, blur, spread, CSSPrimitiveValue::createIdentifier(CSSValueNone), color);
@@ -64,13 +64,13 @@ protected:
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(toCSSPrimitiveValue(*expectedShadow.x).getDoubleValue(), toCSSPrimitiveValue(*actualShadow.x).getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(*expectedShadow.y).getDoubleValue(), toCSSPrimitiveValue(*actualShadow.y).getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(*expectedShadow.blur).getDoubleValue(), toCSSPrimitiveValue(*actualShadow.blur).getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(*expectedShadow.spread).getDoubleValue(), toCSSPrimitiveValue(*actualShadow.spread).getDoubleValue());
+ EXPECT_EQ(toCSSPrimitiveValue(*expectedShadow.color).getRGBA32Value(), toCSSPrimitiveValue(*actualShadow.color).getRGBA32Value());
- EXPECT_EQ(expectedShadow.style->getValueID(), actualShadow.style->getValueID());
+ EXPECT_EQ(toCSSPrimitiveValue(*expectedShadow.style).getValueID(), toCSSPrimitiveValue(*actualShadow.style).getValueID());
}
}
};
@@ -79,7 +79,7 @@ TEST_F(ListStyleInterpolationTest, LengthListMultipleValuesTest)
{
RefPtrWillBeRawPtr<CSSValueList> expectedList = CSSValueList::createCommaSeparated();
for (size_t i = 0; i < 10; i++) {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> lengthValue = CSSPrimitiveValue::create(static_cast<double>(i), CSSPrimitiveValue::CSS_PX);
+ CSSPrimitiveValue lengthValue = CSSPrimitiveValue::create(static_cast<double>(i), CSSPrimitiveValue::CSS_PX);
expectedList->append(lengthValue);
}
« no previous file with comments | « Source/core/animation/LengthStyleInterpolationTest.cpp ('k') | Source/core/animation/SVGStrokeDasharrayStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698