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

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

Issue 1318543010: Change first() and second() in CSSPairValue to return const references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 5 years, 4 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/LengthPairStyleInterpolation.cpp ('k') | Source/core/css/BasicShapeFunctions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/LengthPairStyleInterpolationTest.cpp
diff --git a/Source/core/animation/LengthPairStyleInterpolationTest.cpp b/Source/core/animation/LengthPairStyleInterpolationTest.cpp
index 6d3b8f140d531f3be0f4b086163a9fc431423d50..72de950ed0dedb747ad065c1d188865f18a3232b 100644
--- a/Source/core/animation/LengthPairStyleInterpolationTest.cpp
+++ b/Source/core/animation/LengthPairStyleInterpolationTest.cpp
@@ -35,15 +35,13 @@ protected:
static void testPrimitiveValue(RefPtrWillBeRawPtr<CSSValue> value, double first, double second, CSSPrimitiveValue::UnitType unitType)
{
EXPECT_TRUE(value->isValuePair());
+ const CSSValuePair& pair = toCSSValuePair(*value);
- CSSValuePair* pair = toCSSValuePair(value.get());
- ASSERT_TRUE(pair);
+ EXPECT_EQ(toCSSPrimitiveValue(pair.first()).getDoubleValue(), first);
+ EXPECT_EQ(toCSSPrimitiveValue(pair.second()).getDoubleValue(), second);
- EXPECT_EQ(toCSSPrimitiveValue(pair->first())->getDoubleValue(), first);
- EXPECT_EQ(toCSSPrimitiveValue(pair->second())->getDoubleValue(), second);
-
- EXPECT_EQ(toCSSPrimitiveValue(pair->first())->typeWithCalcResolved(), unitType);
- EXPECT_EQ(toCSSPrimitiveValue(pair->second())->typeWithCalcResolved(), unitType);
+ EXPECT_EQ(toCSSPrimitiveValue(pair.first()).typeWithCalcResolved(), unitType);
+ EXPECT_EQ(toCSSPrimitiveValue(pair.second()).typeWithCalcResolved(), unitType);
}
};
« no previous file with comments | « Source/core/animation/LengthPairStyleInterpolation.cpp ('k') | Source/core/css/BasicShapeFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698