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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp

Issue 2619163002: More early returns in GeometryMapper methods (Closed)
Patch Set: Fix unit tests Created 3 years, 11 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 | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
index 3b15334881a06b408d22d3c5e17f08e164a85a38..cca8246e2dbafc6f1f282d5f9f28a72da9b03de3 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
@@ -95,13 +95,18 @@ const static float kTestEpsilon = 1e-6;
inputRect, localPropertyTreeState, \
ancestorPropertyTreeState, success)); \
EXPECT_TRUE(success); \
- EXPECT_EQ( \
- expectedTransformToAncestor, \
- getPrecomputedDataForAncestor(ancestorPropertyTreeState) \
- .toAncestorTransforms.get(localPropertyTreeState.transform())); \
- EXPECT_EQ(expectedClipInAncestorSpace, \
- getPrecomputedDataForAncestor(ancestorPropertyTreeState) \
- .toAncestorClipRects.get(localPropertyTreeState.clip())); \
+ if (ancestorPropertyTreeState.transform() != \
+ localPropertyTreeState.transform()) { \
+ EXPECT_EQ( \
+ expectedTransformToAncestor, \
+ getPrecomputedDataForAncestor(ancestorPropertyTreeState) \
+ .toAncestorTransforms.get(localPropertyTreeState.transform())); \
+ } \
+ if (ancestorPropertyTreeState.clip() != localPropertyTreeState.clip()) { \
+ EXPECT_EQ(expectedClipInAncestorSpace, \
+ getPrecomputedDataForAncestor(ancestorPropertyTreeState) \
+ .toAncestorClipRects.get(localPropertyTreeState.clip())); \
+ } \
} while (false)
TEST_F(GeometryMapperTest, Root) {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698