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

Unified Diff: cc/test/CCGeometryTestUtils.h

Issue 10989028: cc: Remove WebCore dependecies from CCRenderPass and CCDrawQuad classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« cc/scoped_ptr_hash_map.h ('K') | « cc/stubs/IntSize.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/CCGeometryTestUtils.h
diff --git a/cc/test/CCGeometryTestUtils.h b/cc/test/CCGeometryTestUtils.h
index 469666003fae53e014d8cc435a9bba2f19d7c8b3..1cbacfd4005960b8c758bcf429a1efc9e44b045d 100644
--- a/cc/test/CCGeometryTestUtils.h
+++ b/cc/test/CCGeometryTestUtils.h
@@ -5,6 +5,9 @@
#ifndef CCGeometryTestUtils_h
#define CCGeometryTestUtils_h
+#include "FloatRect.h"
+#include "IntRect.h"
+
namespace WebKit {
class WebTransformationMatrix;
}
@@ -13,16 +16,16 @@ 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) \
- EXPECT_FLOAT_EQ((expected).location().x(), (actual).location().x()); \
- EXPECT_FLOAT_EQ((expected).location().y(), (actual).location().y()); \
- EXPECT_FLOAT_EQ((expected).size().width(), (actual).size().width()); \
- EXPECT_FLOAT_EQ((expected).size().height(), (actual).size().height())
+ EXPECT_FLOAT_EQ(static_cast<FloatRect>(expected).location().x(), static_cast<FloatRect>(actual).location().x()); \
+ EXPECT_FLOAT_EQ(static_cast<FloatRect>(expected).location().y(), static_cast<FloatRect>(actual).location().y()); \
+ EXPECT_FLOAT_EQ(static_cast<FloatRect>(expected).size().width(), static_cast<FloatRect>(actual).size().width()); \
+ EXPECT_FLOAT_EQ(static_cast<FloatRect>(expected).size().height(), static_cast<FloatRect>(actual).size().height())
#define EXPECT_RECT_EQ(expected, actual) \
- EXPECT_EQ((expected).location().x(), (actual).location().x()); \
- EXPECT_EQ((expected).location().y(), (actual).location().y()); \
- EXPECT_EQ((expected).size().width(), (actual).size().width()); \
- EXPECT_EQ((expected).size().height(), (actual).size().height())
+ EXPECT_EQ(static_cast<IntRect>(expected).location().x(), static_cast<IntRect>(actual).location().x()); \
+ EXPECT_EQ(static_cast<IntRect>(expected).location().y(), static_cast<IntRect>(actual).location().y()); \
+ EXPECT_EQ(static_cast<IntRect>(expected).size().width(), static_cast<IntRect>(actual).size().width()); \
+ EXPECT_EQ(static_cast<IntRect>(expected).size().height(), static_cast<IntRect>(actual).size().height())
// 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
« cc/scoped_ptr_hash_map.h ('K') | « cc/stubs/IntSize.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698