summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_layer_tree_host_client.h2
-rw-r--r--cc/test/geometry_test_utils.h22
-rw-r--r--cc/test/layer_tree_test_common.cc2
-rw-r--r--cc/test/layer_tree_test_common.h2
4 files changed, 17 insertions, 11 deletions
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index 8140495..78e7a8f 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -20,7 +20,7 @@ public:
virtual void didBeginFrame() OVERRIDE { }
virtual void animate(double monotonicFrameBeginTime) OVERRIDE { }
virtual void layout() OVERRIDE { }
- virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale) OVERRIDE { }
+ virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale) OVERRIDE { }
virtual scoped_ptr<WebKit::WebCompositorOutputSurface> createOutputSurface() OVERRIDE;
virtual void didRecreateOutputSurface(bool success) OVERRIDE { }
diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h
index 7877a64..52cb814 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
diff --git a/cc/test/layer_tree_test_common.cc b/cc/test/layer_tree_test_common.cc
index 65a2904..1842d17 100644
--- a/cc/test/layer_tree_test_common.cc
+++ b/cc/test/layer_tree_test_common.cc
@@ -219,7 +219,7 @@ public:
m_testHooks->layout();
}
- virtual void applyScrollAndScale(const IntSize& scrollDelta, float scale) OVERRIDE
+ virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float scale) OVERRIDE
{
m_testHooks->applyScrollAndScale(scrollDelta, scale);
}
diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
index ad044d5..0e02cfa 100644
--- a/cc/test/layer_tree_test_common.h
+++ b/cc/test/layer_tree_test_common.h
@@ -34,7 +34,7 @@ public:
virtual void drawLayersOnThread(cc::LayerTreeHostImpl*) { }
virtual void animateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
virtual void willAnimateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
- virtual void applyScrollAndScale(const cc::IntSize&, float) { }
+ virtual void applyScrollAndScale(gfx::Vector2d, float) { }
virtual void animate(base::TimeTicks monotonicTime) { }
virtual void layout() { }
virtual void didRecreateOutputSurface(bool succeeded) { }