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

Unified Diff: cc/test/geometry_test_utils.h

Issue 11366089: cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove gyp entries for stubs Created 8 years, 1 month 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 | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/geometry_test_utils.h
diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h
index 7877a64986b5e2d19583310decdc7672b943a0c2..52cb814d9a9b5a0dfbc25c389049359dc7210ceb 100644
--- a/cc/test/geometry_test_utils.h
+++ b/cc/test/geometry_test_utils.h
@@ -13,32 +13,38 @@ namespace WebKitTests {
// These are macros instead of functions so that we get useful line numbers where a test failed.
#define EXPECT_FLOAT_RECT_EQ(expected, actual) \
-{ \
+do { \
EXPECT_FLOAT_EQ((expected).x(), (actual).x()); \
EXPECT_FLOAT_EQ((expected).y(), (actual).y()); \
EXPECT_FLOAT_EQ((expected).width(), (actual).width()); \
EXPECT_FLOAT_EQ((expected).height(), (actual).height()); \
-}
+} while (false)
#define EXPECT_RECT_EQ(expected, actual) \
-{ \
+do { \
EXPECT_EQ((expected).x(), (actual).x()); \
EXPECT_EQ((expected).y(), (actual).y()); \
EXPECT_EQ((expected).width(), (actual).width()); \
EXPECT_EQ((expected).height(), (actual).height()); \
-}
+} while (false)
#define EXPECT_SIZE_EQ(expected, actual) \
-{ \
+do { \
EXPECT_EQ((expected).width(), (actual).width()); \
EXPECT_EQ((expected).height(), (actual).height()); \
-}
+} while (false)
#define EXPECT_POINT_EQ(expected, actual) \
-{ \
+do { \
EXPECT_EQ((expected).x(), (actual).x()); \
EXPECT_EQ((expected).y(), (actual).y()); \
-}
+} while (false)
+
+#define EXPECT_VECTOR_EQ(expected, actual) \
+do { \
+ EXPECT_EQ((expected).x(), (actual).x()); \
+ EXPECT_EQ((expected).y(), (actual).y()); \
+} while (false)
// This is a function rather than a macro because when this is included as a macro
// in bulk, it causes a significant slow-down in compilation time. This problem
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698