[chromium] Consolidate geometry unit testing functions for cc
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Sep 2012 00:20:52 +0000 (00:20 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Sep 2012 00:20:52 +0000 (00:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=95526

Reviewed by Julien Chaffraix.

This consolidates geometry equality (rects, matrices) in CCGeometryUtils and removes a few duplicate macros for
testing rect equality.

* WebKit.gypi:
* tests/CCDamageTrackerTest.cpp:
(WebKitTests::TEST_F):
* tests/CCGeometryTestUtils.cpp: Added.
(WebKitTests):
(WebKitTests::ExpectTransformationMatrixEq):
* tests/CCGeometryTestUtils.h: Renamed from Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h.
(WebKit):
(WebKitTests):
* tests/CCLayerTreeHostTest.cpp:
* tests/CCMathUtilTest.cpp:
(WebKit::TEST):
* tests/TiledLayerChromiumTest.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127340 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp
Source/WebKit/chromium/tests/CCGeometryTestUtils.cpp [new file with mode: 0644]
Source/WebKit/chromium/tests/CCGeometryTestUtils.h [moved from Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h with 87% similarity]
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/CCMathUtilTest.cpp
Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp
Source/WebKit/chromium/tests/ContentLayerChromiumTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
Source/WebKit/chromium/tests/WebTransformOperationsTest.cpp
Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp

index 140d484..a36488b 100644 (file)
@@ -1,5 +1,29 @@
 2012-08-31  James Robinson  <jamesr@chromium.org>
 
+        [chromium] Consolidate geometry unit testing functions for cc
+        https://bugs.webkit.org/show_bug.cgi?id=95526
+
+        Reviewed by Julien Chaffraix.
+
+        This consolidates geometry equality (rects, matrices) in CCGeometryUtils and removes a few duplicate macros for
+        testing rect equality.
+
+        * WebKit.gypi:
+        * tests/CCDamageTrackerTest.cpp:
+        (WebKitTests::TEST_F):
+        * tests/CCGeometryTestUtils.cpp: Added.
+        (WebKitTests):
+        (WebKitTests::ExpectTransformationMatrixEq):
+        * tests/CCGeometryTestUtils.h: Renamed from Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h.
+        (WebKit):
+        (WebKitTests):
+        * tests/CCLayerTreeHostTest.cpp:
+        * tests/CCMathUtilTest.cpp:
+        (WebKit::TEST):
+        * tests/TiledLayerChromiumTest.cpp:
+
+2012-08-31  James Robinson  <jamesr@chromium.org>
+
         [chromium] Clean up Web*Layer initialization paths
         https://bugs.webkit.org/show_bug.cgi?id=95523
 
index c1100ce..54f0db8 100644 (file)
             'tests/CCDamageTrackerTest.cpp',
             'tests/CCDelayBasedTimeSourceTest.cpp',
             'tests/CCFrameRateControllerTest.cpp',
+            'tests/CCGeometryTestUtils.cpp',
+            'tests/CCGeometryTestUtils.h',
             'tests/CCHeadsUpDisplayTest.cpp',
             'tests/CCKeyframedAnimationCurveTest.cpp',
             'tests/CCLayerAnimationControllerTest.cpp',
             'tests/CCLayerTreeHostCommonTest.cpp',
             'tests/CCLayerTreeHostImplTest.cpp',
             'tests/CCLayerTreeHostTest.cpp',
-            'tests/CCLayerTreeTestCommon.h',
             'tests/CCMathUtilTest.cpp',
             'tests/CCOcclusionTrackerTest.cpp',
             'tests/CCOcclusionTrackerTestCommon.h',
index f9eecdb..e50a1f7 100644 (file)
 
 #include "CCDamageTracker.h"
 
+#include "CCGeometryTestUtils.h"
 #include "CCLayerImpl.h"
 #include "CCLayerSorter.h"
 #include "CCLayerTreeHostCommon.h"
-#include "CCLayerTreeTestCommon.h"
 #include "CCMathUtil.h"
 #include "CCSingleThreadProxy.h"
 #include <gtest/gtest.h>
diff --git a/Source/WebKit/chromium/tests/CCGeometryTestUtils.cpp b/Source/WebKit/chromium/tests/CCGeometryTestUtils.cpp
new file mode 100644 (file)
index 0000000..a17fc64
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "CCGeometryTestUtils.h"
+
+#include <gtest/gtest.h>
+#include <public/WebTransformationMatrix.h>
+
+namespace WebKitTests {
+
+void ExpectTransformationMatrixEq(const WebKit::WebTransformationMatrix& expected,
+                                  const WebKit::WebTransformationMatrix& actual)
+{
+    EXPECT_FLOAT_EQ((expected).m11(), (actual).m11());
+    EXPECT_FLOAT_EQ((expected).m12(), (actual).m12());
+    EXPECT_FLOAT_EQ((expected).m13(), (actual).m13());
+    EXPECT_FLOAT_EQ((expected).m14(), (actual).m14());
+    EXPECT_FLOAT_EQ((expected).m21(), (actual).m21());
+    EXPECT_FLOAT_EQ((expected).m22(), (actual).m22());
+    EXPECT_FLOAT_EQ((expected).m23(), (actual).m23());
+    EXPECT_FLOAT_EQ((expected).m24(), (actual).m24());
+    EXPECT_FLOAT_EQ((expected).m31(), (actual).m31());
+    EXPECT_FLOAT_EQ((expected).m32(), (actual).m32());
+    EXPECT_FLOAT_EQ((expected).m33(), (actual).m33());
+    EXPECT_FLOAT_EQ((expected).m34(), (actual).m34());
+    EXPECT_FLOAT_EQ((expected).m41(), (actual).m41());
+    EXPECT_FLOAT_EQ((expected).m42(), (actual).m42());
+    EXPECT_FLOAT_EQ((expected).m43(), (actual).m43());
+    EXPECT_FLOAT_EQ((expected).m44(), (actual).m44());
+}
+
+} // namespace WebKitTests
+
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef CCLayerTreeTestCommon_h
-#define CCLayerTreeTestCommon_h
+#ifndef CCGeometryTestUtils_h
+#define CCGeometryTestUtils_h
 
-#include <public/WebTransformationMatrix.h>
+namespace WebKit {
+class WebTransformationMatrix;
+}
 
 namespace WebKitTests {
 
@@ -36,7 +38,7 @@ namespace WebKitTests {
     EXPECT_FLOAT_EQ((expected).size().width(), (actual).size().width()); \
     EXPECT_FLOAT_EQ((expected).size().height(), (actual).size().height())
 
-#define EXPECT_INT_RECT_EQ(expected, actual)                            \
+#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());      \
@@ -46,8 +48,8 @@ namespace WebKitTests {
 // in bulk, it causes a significant slow-down in compilation time. This problem
 // exists with both gcc and clang, and bugs have been filed at
 // http://llvm.org/bugs/show_bug.cgi?id=13651 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337
-void ExpectTransformationMatrixEq(WebKit::WebTransformationMatrix expected,
-                                  WebKit::WebTransformationMatrix actual);
+void ExpectTransformationMatrixEq(const WebKit::WebTransformationMatrix& expected,
+                                  const WebKit::WebTransformationMatrix& actual);
 
 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual)            \
     {                                                                \
@@ -55,6 +57,6 @@ void ExpectTransformationMatrixEq(WebKit::WebTransformationMatrix expected,
         WebKitTests::ExpectTransformationMatrixEq(expected, actual); \
     }
 
-} // namespace
+} // namespace WebKitTests
 
-#endif // CCLayerTreeTestCommon_h
+#endif // CCGeometryTestUtils_h
index f72884f..3d008ce 100644 (file)
 #include "CCLayerTreeHostCommon.h"
 
 #include "CCAnimationTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "CCLayerAnimationController.h"
 #include "CCLayerImpl.h"
 #include "CCLayerSorter.h"
-#include "CCLayerTreeTestCommon.h"
 #include "CCMathUtil.h"
 #include "CCProxy.h"
 #include "CCSingleThreadProxy.h"
@@ -47,27 +47,6 @@ using namespace WebCore;
 using namespace WebKitTests;
 using WebKit::WebTransformationMatrix;
 
-void WebKitTests::ExpectTransformationMatrixEq(WebTransformationMatrix expected,
-                                               WebTransformationMatrix actual)
-{
-    EXPECT_FLOAT_EQ((expected).m11(), (actual).m11());
-    EXPECT_FLOAT_EQ((expected).m12(), (actual).m12());
-    EXPECT_FLOAT_EQ((expected).m13(), (actual).m13());
-    EXPECT_FLOAT_EQ((expected).m14(), (actual).m14());
-    EXPECT_FLOAT_EQ((expected).m21(), (actual).m21());
-    EXPECT_FLOAT_EQ((expected).m22(), (actual).m22());
-    EXPECT_FLOAT_EQ((expected).m23(), (actual).m23());
-    EXPECT_FLOAT_EQ((expected).m24(), (actual).m24());
-    EXPECT_FLOAT_EQ((expected).m31(), (actual).m31());
-    EXPECT_FLOAT_EQ((expected).m32(), (actual).m32());
-    EXPECT_FLOAT_EQ((expected).m33(), (actual).m33());
-    EXPECT_FLOAT_EQ((expected).m34(), (actual).m34());
-    EXPECT_FLOAT_EQ((expected).m41(), (actual).m41());
-    EXPECT_FLOAT_EQ((expected).m42(), (actual).m42());
-    EXPECT_FLOAT_EQ((expected).m43(), (actual).m43());
-    EXPECT_FLOAT_EQ((expected).m44(), (actual).m44());
-}
-
 namespace {
 
 template<typename LayerType>
@@ -1479,9 +1458,9 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableContentRectForLayers)
     CCLayerTreeHostCommon::calculateDrawTransforms(parent.get(), parent->bounds(), 1, dummyMaxTextureSize, renderSurfaceLayerList);
     CCLayerTreeHostCommon::calculateVisibleRects(renderSurfaceLayerList);
 
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(5, 5), IntSize(10, 10)), grandChild1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(15, 15), IntSize(5, 5)), grandChild3->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(15, 15), IntSize(5, 5)), grandChild3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(5, 5), IntSize(10, 10)), grandChild1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(15, 15), IntSize(5, 5)), grandChild3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(15, 15), IntSize(5, 5)), grandChild3->drawableContentRect());
     EXPECT_TRUE(grandChild4->drawableContentRect().isEmpty());
 }
 
@@ -1551,9 +1530,9 @@ TEST(CCLayerTreeHostCommonTest, verifyClipRectIsPropagatedCorrectlyToSurfaces)
     EXPECT_FALSE(grandChild4->renderSurface()); // Because grandChild4 is entirely clipped, it is expected to not have a renderSurface.
 
     // Surfaces are clipped by their parent, but un-affected by the owning layer's masksToBounds.
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild1->renderSurface()->clipRect());
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild2->renderSurface()->clipRect());
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild3->renderSurface()->clipRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild1->renderSurface()->clipRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild2->renderSurface()->clipRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint(0, 0), IntSize(20, 20)), grandChild3->renderSurface()->clipRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyAnimationsForRenderSurfaceHierarchy)
@@ -1708,7 +1687,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForIdentityTransform)
     IntRect layerContentRect = IntRect(IntPoint(10, 10), IntSize(30, 30));
     IntRect expected = IntRect(IntPoint(10, 10), IntSize(30, 30));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 2: Layer is outside the surface rect.
     layerContentRect = IntRect(IntPoint(120, 120), IntSize(30, 30));
@@ -1719,7 +1698,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForIdentityTransform)
     layerContentRect = IntRect(IntPoint(80, 80), IntSize(30, 30));
     expected = IntRect(IntPoint(80, 80), IntSize(20, 20));
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForTranslations)
@@ -1735,7 +1714,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForTranslations)
     layerToSurfaceTransform.translate(10, 10);
     IntRect expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 2: Layer is outside the surface rect.
     layerToSurfaceTransform.makeIdentity();
@@ -1748,7 +1727,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForTranslations)
     layerToSurfaceTransform.translate(80, 80);
     expected = IntRect(IntPoint(0, 0), IntSize(20, 20));
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
@@ -1766,7 +1745,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
     layerToSurfaceTransform.rotate(45);
     IntRect expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 2: Layer is outside the surface rect.
     layerToSurfaceTransform.makeIdentity();
@@ -1784,7 +1763,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
     layerToSurfaceTransform.rotate(45);
     expected = IntRect(IntPoint(0, 0), IntSize(30, 30));
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 4: The layer is rotated about its top-left corner, and translated upwards. In
     //         surface space, the layer is oriented diagonally, with only the top corner
@@ -1796,7 +1775,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor2DRotations)
     layerToSurfaceTransform.rotate(45);
     expected = IntRect(IntPoint(15, 0), IntSize(15, 30)); // right half of layer bounds.
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
@@ -1812,7 +1791,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
     layerToSurfaceTransform.rotate3d(0, 45, 0);
     IntRect expected = IntRect(IntPoint(0, 0), IntSize(100, 100));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 2: Orthographic projection of a layer rotated about y-axis by 45 degrees, but
     //         shifted to the side so only the right-half the layer would be visible on
@@ -1823,7 +1802,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicTransform)
     layerToSurfaceTransform.rotate3d(0, 45, 0); // rotates about the left edge of the layer
     expected = IntRect(IntPoint(50, 0), IntSize(50, 100)); // right half of the layer.
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
@@ -1850,7 +1829,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
 
     IntRect expected = IntRect(IntPoint(-50, -50), IntSize(200, 200));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 
     // Case 2: same projection as before, except that the layer is also translated to the
     //         side, so that only the right half of the layer should be visible.
@@ -1863,7 +1842,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveTransform)
     layerToSurfaceTransform.translate3d(-200, 0, 0);
     expected = IntRect(IntPoint(50, -50), IntSize(100, 200)); // The right half of the layer's bounding rect.
     actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicIsNotClippedBehindSurface)
@@ -1886,7 +1865,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dOrthographicIsNotClippedBe
 
     IntRect expected = IntRect(IntPoint(0, 0), IntSize(100, 100));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveWhenClippedByW)
@@ -1952,7 +1931,7 @@ TEST(CCLayerTreeHostCommonTest, verifyVisibleRectForPerspectiveUnprojection)
     // that the entire layer should still be considered visible.
     IntRect expected = IntRect(IntPoint(-10, -10), IntSize(20, 20));
     IntRect actual = CCLayerTreeHostCommon::calculateVisibleRect(targetSurfaceRect, layerContentRect, layerToSurfaceTransform);
-    EXPECT_INT_RECT_EQ(expected, actual);
+    EXPECT_RECT_EQ(expected, actual);
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForSimpleLayers)
@@ -1973,21 +1952,21 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForSimpleLay
 
     executeCalculateDrawTransformsAndVisibility(root.get());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
 
     // layer visibleContentRects are clipped by their targetSurface
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 25, 25), child2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 25, 25), child2->visibleContentRect());
     EXPECT_TRUE(child3->visibleContentRect().isEmpty());
 
     // layer drawableContentRects are not clipped.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersClippedByLayer)
@@ -2014,21 +1993,21 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersCli
 
     ASSERT_FALSE(child->renderSurface());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), child->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), child->visibleContentRect());
 
     // All grandchild visibleContentRects should be clipped by child.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), grandChild1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 25, 25), grandChild2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), grandChild1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 25, 25), grandChild2->visibleContentRect());
     EXPECT_TRUE(grandChild3->visibleContentRect().isEmpty());
 
     // All grandchild drawableContentRects should also be clipped by child.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 50, 50), grandChild1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(75, 75, 25, 25), grandChild2->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 50, 50), grandChild1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(75, 75, 25, 25), grandChild2->drawableContentRect());
     EXPECT_TRUE(grandChild3->drawableContentRect().isEmpty());
 }
 
@@ -2056,24 +2035,24 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersInU
 
     ASSERT_TRUE(renderSurface1->renderSurface());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
 
     // An unclipped surface grows its drawableContentRect to include all drawable regions of the subtree.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 170, 170), renderSurface1->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 170, 170), renderSurface1->renderSurface()->drawableContentRect());
 
     // All layers that draw content into the unclipped surface are also unclipped.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child2->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child3->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child3->visibleContentRect());
 
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersInClippedRenderSurface)
@@ -2101,26 +2080,26 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersInC
 
     ASSERT_TRUE(renderSurface1->renderSurface());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
 
     // A clipped surface grows its drawableContentRect to include all drawable regions of the subtree,
     // but also gets clamped by the ancestor's clip.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 95, 95), renderSurface1->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 95, 95), renderSurface1->renderSurface()->drawableContentRect());
 
     // All layers that draw content into the surface have their visibleContentRect clipped by the surface clipRect.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 25, 25), child2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 25, 25), child2->visibleContentRect());
     EXPECT_TRUE(child3->visibleContentRect().isEmpty());
 
     // But the drawableContentRects are unclipped.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForSurfaceHierarchy)
@@ -2154,32 +2133,32 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForSurfaceHi
     ASSERT_TRUE(renderSurface1->renderSurface());
     ASSERT_TRUE(renderSurface2->renderSurface());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface2->visibleContentRect());
 
     // A clipped surface grows its drawableContentRect to include all drawable regions of the subtree,
     // but also gets clamped by the ancestor's clip.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 95, 95), renderSurface1->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 95, 95), renderSurface1->renderSurface()->drawableContentRect());
 
     // renderSurface1 lives in the "unclipped universe" of renderSurface1, and is only
     // implicitly clipped by renderSurface1's contentRect. So, renderSurface2 grows to
     // enclose all drawable content of its subtree.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 170, 170), renderSurface2->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 170, 170), renderSurface2->renderSurface()->drawableContentRect());
 
     // All layers that draw content into renderSurface2 think they are unclipped.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child2->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child3->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child2->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child3->visibleContentRect());
 
     // drawableContentRects are also unclipped.
-    EXPECT_INT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(5, 5, 50, 50), child1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(75, 75, 50, 50), child2->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(125, 125, 50, 50), child3->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsWithTransformOnUnclippedSurface)
@@ -2205,21 +2184,21 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsWithTransfor
 
     ASSERT_TRUE(renderSurface1->renderSurface());
 
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), root->drawableContentRect());
 
     // Layers that do not draw content should have empty visibleContentRects.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), root->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), renderSurface1->visibleContentRect());
 
     // The unclipped surface grows its drawableContentRect to include all drawable regions of the subtree.
     int diagonalRadius = ceil(sqrt(2.0) * 25);
     IntRect expectedSurfaceDrawableContent = IntRect(50 - diagonalRadius, 50 - diagonalRadius, diagonalRadius * 2, diagonalRadius * 2);
-    EXPECT_INT_RECT_EQ(expectedSurfaceDrawableContent, renderSurface1->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(expectedSurfaceDrawableContent, renderSurface1->renderSurface()->drawableContentRect());
 
     // All layers that draw content into the unclipped surface are also unclipped.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
-    EXPECT_INT_RECT_EQ(expectedSurfaceDrawableContent, child1->drawableContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(expectedSurfaceDrawableContent, child1->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsWithTransformOnClippedSurface)
@@ -2250,15 +2229,15 @@ TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsWithTransfor
     int diagonalRadius = ceil(sqrt(2.0) * 25);
     IntRect unclippedSurfaceContent = IntRect(50 - diagonalRadius, 50 - diagonalRadius, diagonalRadius * 2, diagonalRadius * 2);
     IntRect expectedSurfaceDrawableContent = intersection(unclippedSurfaceContent, IntRect(0, 0, 50, 50));
-    EXPECT_INT_RECT_EQ(expectedSurfaceDrawableContent, renderSurface1->renderSurface()->drawableContentRect());
+    EXPECT_RECT_EQ(expectedSurfaceDrawableContent, renderSurface1->renderSurface()->drawableContentRect());
 
     // On the clipped surface, only a quarter  of the child1 is visible, but when rotating
     // it back to  child1's content space, the actual enclosing rect ends up covering the
     // full left half of child1.
-    EXPECT_INT_RECT_EQ(IntRect(0, 0, 26, 50), child1->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(0, 0, 26, 50), child1->visibleContentRect());
 
     // The child's drawableContentRect is unclipped.
-    EXPECT_INT_RECT_EQ(unclippedSurfaceContent, child1->drawableContentRect());
+    EXPECT_RECT_EQ(unclippedSurfaceContent, child1->drawableContentRect());
 }
 
 TEST(CCLayerTreeHostCommonTest, verifyBackFaceCullingWithoutPreserves3d)
@@ -2901,7 +2880,7 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForSingleLayerWithScaledContents
     // Sanity check the scenario we just created.
     // The visibleContentRect for testLayer is actually 100x100, even though its layout size is 50x50, positioned at 25x25.
     CCLayerImpl* testLayer = root->children()[0].get();
-    EXPECT_INT_RECT_EQ(IntRect(IntPoint::zero(), IntSize(100, 100)), testLayer->visibleContentRect());
+    EXPECT_RECT_EQ(IntRect(IntPoint::zero(), IntSize(100, 100)), testLayer->visibleContentRect());
     ASSERT_EQ(1u, renderSurfaceLayerList.size());
     ASSERT_EQ(1u, root->renderSurface()->layerList().size());
 
@@ -3522,7 +3501,7 @@ TEST(CCLayerTreeHostCommonTest, verifyRenderSurfaceTransformsInHighDPI)
     WebTransformationMatrix expectedDuplicateChildDrawTransform = child->drawTransform();
     EXPECT_TRANSFORMATION_MATRIX_EQ(child->drawTransform(), duplicateChildNonOwner->drawTransform());
     EXPECT_TRANSFORMATION_MATRIX_EQ(child->screenSpaceTransform(), duplicateChildNonOwner->screenSpaceTransform());
-    EXPECT_INT_RECT_EQ(child->drawableContentRect(), duplicateChildNonOwner->drawableContentRect());
+    EXPECT_RECT_EQ(child->drawableContentRect(), duplicateChildNonOwner->drawableContentRect());
     EXPECT_EQ(child->contentBounds(), duplicateChildNonOwner->contentBounds());
 
     WebTransformationMatrix expectedRenderSurfaceDrawTransform;
index 562c086..d09bc36 100644 (file)
 #include "CCLayerTreeHostImpl.h"
 
 #include "CCAnimationTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "CCHeadsUpDisplayLayerImpl.h"
 #include "CCIOSurfaceLayerImpl.h"
 #include "CCLayerImpl.h"
 #include "CCLayerTestCommon.h"
 #include "CCLayerTilingData.h"
-#include "CCLayerTreeTestCommon.h"
 #include "CCQuadSink.h"
 #include "CCRenderPassDrawQuad.h"
 #include "CCRendererGL.h"
@@ -2820,7 +2820,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithClipping)
         EXPECT_LT(quadVisibleRect.width(), 100);
 
         // Verify that the render surface texture is *not* clipped.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), frame.renderPasses[0]->outputRect());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), frame.renderPasses[0]->outputRect());
 
         EXPECT_EQ(CCDrawQuad::RenderPass, frame.renderPasses[1]->quadList()[0]->material());
         CCRenderPassDrawQuad* quad = static_cast<CCRenderPassDrawQuad*>(frame.renderPasses[1]->quadList()[0].get());
index 36be5a5..596eeca 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "CCLayerTreeHost.h"
 
+#include "CCGeometryTestUtils.h"
 #include "CCGraphicsContext.h"
 #include "CCLayerTreeHostImpl.h"
 #include "CCOcclusionTrackerTestCommon.h"
@@ -47,12 +48,6 @@ using namespace WebCore;
 using namespace WebKit;
 using namespace WebKitTests;
 
-#define EXPECT_EQ_RECT(a, b) \
-    EXPECT_EQ(a.x(), b.x()); \
-    EXPECT_EQ(a.y(), b.y()); \
-    EXPECT_EQ(a.width(), b.width()); \
-    EXPECT_EQ(a.height(), b.height());
-
 namespace {
 
 class CCLayerTreeHostTest : public CCThreadedTest { };
@@ -1346,7 +1341,7 @@ public:
         ASSERT_EQ(2u, root->renderSurface()->layerList().size());
 
         // The root render surface is the size of the viewport.
-        EXPECT_EQ_RECT(IntRect(0, 0, 60, 60), root->renderSurface()->contentRect());
+        EXPECT_RECT_EQ(IntRect(0, 0, 60, 60), root->renderSurface()->contentRect());
 
         WebTransformationMatrix scaleTransform;
         scaleTransform.scale(impl->deviceScaleFactor());
@@ -1686,11 +1681,11 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer is opaque, then it adds to the occlusion seen by the rootLayer.
@@ -1703,11 +1698,11 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 170, 170), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // Add a second child to the root layer and the regions should merge
@@ -1721,13 +1716,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 20, 170, 180), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 20, 170, 180), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(2u, rootLayer->occludedScreenSpace().rects().size());
 
         // Move the second child to be sure.
@@ -1741,13 +1736,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 170, 170), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 30, 190, 170), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 30, 190, 170), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(2u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer has a mask on it, then it shouldn't contribute to occlusion on stuff below it
@@ -1763,13 +1758,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer with a mask is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
@@ -1785,13 +1780,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer has a non-opaque drawOpacity, then it shouldn't contribute to occlusion on stuff below it
@@ -1808,13 +1803,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer with non-opaque drawOpacity is below child2, then child2 should contribute to occlusion on everything, and child shouldn't contribute to the rootLayer
@@ -1831,13 +1826,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // Kill the layerTreeHost immediately.
@@ -1894,13 +1889,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 40, 190, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(2u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // If the child layer has a filter that moves pixels/changes alpha, and is below child2, then child should not inherit occlusion from outside its subtree,
@@ -1921,13 +1916,13 @@ public:
         m_layerTreeHost->updateLayers(queue, std::numeric_limits<size_t>::max());
         m_layerTreeHost->commitComplete();
 
-        EXPECT_EQ_RECT(IntRect(), child2->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), child2->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, child2->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(), grandChild->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), grandChild->occludedScreenSpace().bounds());
         EXPECT_EQ(0u, grandChild->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 170, 160), child->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, child->occludedScreenSpace().rects().size());
-        EXPECT_EQ_RECT(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 70, 190, 130), rootLayer->occludedScreenSpace().bounds());
         EXPECT_EQ(1u, rootLayer->occludedScreenSpace().rects().size());
 
         // Kill the layerTreeHost immediately.
@@ -1986,7 +1981,7 @@ public:
         for (int i = 0; i < numSurfaces-1; ++i) {
             IntRect expectedOcclusion(i+1, i+1, 200-i-1, 200-i-1);
 
-            EXPECT_EQ_RECT(expectedOcclusion, layers[i]->occludedScreenSpace().bounds());
+            EXPECT_RECT_EQ(expectedOcclusion, layers[i]->occludedScreenSpace().bounds());
             EXPECT_EQ(1u, layers[i]->occludedScreenSpace().rects().size());
         }
 
index 416e1b5..553f7a6 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "CCMathUtil.h"
 
-#include "CCLayerTreeTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "FloatRect.h"
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
index 171676f..560784b 100644 (file)
 #include "CCOcclusionTracker.h"
 
 #include "CCAnimationTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "CCLayerAnimationController.h"
 #include "CCLayerImpl.h"
 #include "CCLayerTreeHostCommon.h"
-#include "CCLayerTreeTestCommon.h"
 #include "CCMathUtil.h"
 #include "CCOcclusionTrackerTestCommon.h"
 #include "CCOverdrawMetrics.h"
@@ -446,9 +446,9 @@ protected:
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
@@ -466,14 +466,14 @@ protected:
         occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
     }
 };
 
@@ -499,9 +499,9 @@ protected:
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
@@ -519,14 +519,14 @@ protected:
         occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(30, 29, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(31, 29, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(100, 30, 1, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(31, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(31, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 31, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(29, 31, 70, 70), occlusion.unoccludedContentRect(parent, IntRect(29, 31, 70, 70)));
     }
 };
 
@@ -550,9 +550,9 @@ protected:
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(50, 50, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(50, 50, 50, 50)));
@@ -570,25 +570,25 @@ protected:
         occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(51, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(100, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(51, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(50, 100, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 51, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
 
         occlusion.useDefaultLayerClipRect();
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 50, 50, 50)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 50, 1, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 50, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 49, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(49, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(50, 49, 50, 1), occlusion.unoccludedContentRect(parent, IntRect(50, 49, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(51, 49, 49, 1), occlusion.unoccludedContentRect(parent, IntRect(51, 49, 50, 50)));
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 50, 50, 50)).isEmpty());
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(51, 51, 50, 50)).isEmpty());
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(50, 51, 50, 50)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(49, 51, 1, 49), occlusion.unoccludedContentRect(parent, IntRect(49, 51, 50, 50)));
         occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
     }
 };
@@ -618,17 +618,17 @@ protected:
         this->visitLayer(layer, occlusion);
         this->enterContributingSurface(child, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->leaveContributingSurface(child, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
@@ -700,36 +700,36 @@ protected:
 
         this->visitLayer(child2, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 60, 20), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(layer, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->enterContributingSurface(child, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // Occlusion in |child2| should get merged with the |child| surface we are leaving now.
         this->leaveContributingSurface(child, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 30, 70, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(90, 30, 10, 10), occlusion.unoccludedContentRect(parent, IntRect(30, 30, 70, 70)));
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 30, 60, 10)));
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(29, 30, 60, 10)));
@@ -742,21 +742,21 @@ protected:
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 30, 60, 10)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 60, 10)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 60, 10)));
-        EXPECT_INT_RECT_EQ(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 60, 10)));
+        EXPECT_RECT_EQ(IntRect(29, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(29, 30, 60, 10)));
+        EXPECT_RECT_EQ(IntRect(30, 29, 60, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 60, 10)));
+        EXPECT_RECT_EQ(IntRect(90, 30, 1, 10), occlusion.unoccludedContentRect(parent, IntRect(31, 30, 60, 10)));
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 31, 60, 10)).isEmpty());
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
         // This rect is mostly occluded by |child2|.
-        EXPECT_INT_RECT_EQ(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(90, 39, 10, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
         // This rect extends past top/right ends of |child2|.
-        EXPECT_INT_RECT_EQ(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
+        EXPECT_RECT_EQ(IntRect(30, 29, 70, 11), occlusion.unoccludedContentRect(parent, IntRect(30, 29, 70, 70)));
         // This rect extends past left/right ends of |child2|.
-        EXPECT_INT_RECT_EQ(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent, IntRect(20, 39, 80, 60)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(20, 39, 80, 60), occlusion.unoccludedContentRect(parent, IntRect(20, 39, 80, 60)));
+        EXPECT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
 
         /* Justification for the above occlusion from |layer|:
                    100
@@ -814,9 +814,9 @@ protected:
         this->visitLayer(layer, occlusion);
         this->enterContributingSurface(child, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(clippedLayerInChild, occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child, clippedLayerInChild));
@@ -841,13 +841,13 @@ protected:
         this->leaveContributingSurface(child, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(75, 55, 1, 1)));
-        EXPECT_INT_RECT_EQ(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent, IntRect(75, 55, 1, 1)));
+        EXPECT_RECT_EQ(IntRect(75, 55, 1, 1), occlusion.unoccludedContentRect(parent, IntRect(75, 55, 1, 1)));
     }
 };
 
@@ -878,9 +878,9 @@ protected:
         this->visitLayer(layer1, occlusion);
         this->enterContributingSurface(child, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 430, 60, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child, IntRect(10, 430, 60, 70)));
@@ -890,17 +890,17 @@ protected:
         EXPECT_FALSE(occlusion.occluded(child, IntRect(10, 431, 60, 70)));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(child, IntRect(10, 430, 60, 70)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
-        EXPECT_INT_RECT_EQ(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
+        EXPECT_RECT_EQ(IntRect(9, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(9, 430, 60, 70)));
+        EXPECT_RECT_EQ(IntRect(10, 429, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 429, 60, 70)));
+        EXPECT_RECT_EQ(IntRect(70, 430, 1, 70), occlusion.unoccludedContentRect(child, IntRect(11, 430, 60, 70)));
+        EXPECT_RECT_EQ(IntRect(10, 500, 60, 1), occlusion.unoccludedContentRect(child, IntRect(10, 431, 60, 70)));
 
         this->leaveContributingSurface(child, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 40, 70, 60), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(30, 40, 70, 60)));
@@ -908,10 +908,10 @@ protected:
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(30, 39, 70, 60)));
 
         EXPECT_TRUE(occlusion.unoccludedContentRect(parent, IntRect(30, 40, 70, 60)).isEmpty());
-        EXPECT_INT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
-        EXPECT_INT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(29, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(29, 40, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(30, 39, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 39, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(100, 40, 1, 60), occlusion.unoccludedContentRect(parent, IntRect(31, 40, 70, 60)));
+        EXPECT_RECT_EQ(IntRect(30, 100, 70, 1), occlusion.unoccludedContentRect(parent, IntRect(30, 41, 70, 60)));
 
         /* Justification for the above occlusion from |layer1| and |layer2|:
 
@@ -966,9 +966,9 @@ protected:
         this->visitLayer(layer2, occlusion);
         this->enterContributingSurface(child2, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
@@ -986,15 +986,15 @@ protected:
         occlusion.setLayerClipRect(IntRect(-20, -20, 1000, 1000));
 
         // There is nothing above child2's surface in the z-order.
-        EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
+        EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
 
         this->leaveContributingSurface(child2, occlusion);
         this->visitLayer(layer1, occlusion);
         this->enterContributingSurface(child1, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(-10, 430, 80, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child1, IntRect(-10, 430, 80, 70)));
@@ -1004,14 +1004,14 @@ protected:
         EXPECT_FALSE(occlusion.occluded(child1, IntRect(-10, 430, 80, 71)));
 
         // child2's contents will occlude child1 below it.
-        EXPECT_INT_RECT_EQ(IntRect(-10, 430, 10, 70), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(-10, 430, 80, 70)));
+        EXPECT_RECT_EQ(IntRect(-10, 430, 10, 70), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(-10, 430, 80, 70)));
 
         this->leaveContributingSurface(child1, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(20, 20, 80, 80), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(20, 20, 80, 80)));
@@ -1081,9 +1081,9 @@ protected:
         this->visitLayer(layer2, occlusion);
         this->enterLayer(child2, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(20, 30, 80, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child2, IntRect(-10, 420, 70, 80)));
@@ -1096,15 +1096,15 @@ protected:
         this->enterContributingSurface(child2, occlusion);
 
         // There is nothing above child2's surface in the z-order.
-        EXPECT_INT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
+        EXPECT_RECT_EQ(IntRect(-10, 420, 70, 80), occlusion.unoccludedContributingSurfaceContentRect(child2, false, IntRect(-10, 420, 70, 80)));
 
         this->leaveContributingSurface(child2, occlusion);
         this->visitLayer(layer1, occlusion);
         this->enterContributingSurface(child1, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(child1, IntRect(420, -20, 80, 90)));
@@ -1114,16 +1114,16 @@ protected:
         EXPECT_FALSE(occlusion.occluded(child1, IntRect(421, -20, 80, 90)));
 
         // child2's contents will occlude child1 below it.
-        EXPECT_INT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 80, 90)));
-        EXPECT_INT_RECT_EQ(IntRect(490, -10, 10, 80), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -10, 80, 90)));
-        EXPECT_INT_RECT_EQ(IntRect(420, -20, 70, 10), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 70, 90)));
+        EXPECT_RECT_EQ(IntRect(420, -20, 80, 90), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 80, 90)));
+        EXPECT_RECT_EQ(IntRect(490, -10, 10, 80), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -10, 80, 90)));
+        EXPECT_RECT_EQ(IntRect(420, -20, 70, 10), occlusion.unoccludedContributingSurfaceContentRect(child1, false, IntRect(420, -20, 70, 90)));
 
         this->leaveContributingSurface(child1, occlusion);
         this->enterLayer(parent, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(10, 20, 90, 80), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(10, 20, 90, 80)));
@@ -1209,16 +1209,16 @@ protected:
         this->visitLayer(opaqueLayer, occlusion);
         this->enterContributingSurface(opaqueLayer, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 430, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // And it gets translated to the parent surface.
         this->leaveContributingSurface(opaqueLayer, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The blur layer needs to throw away any occlusion from outside its subtree.
@@ -1235,9 +1235,9 @@ protected:
         // But the opaque layer's occlusion is preserved on the parent. 
         this->leaveContributingSurface(blurLayer, occlusion);
         this->enterLayer(parent, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(30, 30, 70, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -1259,16 +1259,16 @@ protected:
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitContributingSurface(surface, occlusion);
         this->enterLayer(parent, occlusion);
 
         // The surface and replica should both be occluding the parent.
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -1291,16 +1291,16 @@ protected:
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitContributingSurface(surface, occlusion);
         this->enterLayer(parent, occlusion);
 
         // The surface and replica should both be occluding the parent.
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 70), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 100, 70), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -1323,16 +1323,16 @@ protected:
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitContributingSurface(surface, occlusion);
         this->enterLayer(parent, occlusion);
 
         // The replica should not be occluding the parent, since it has a mask applied to it.
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -1377,7 +1377,7 @@ protected:
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
 
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
     }
 };
 
@@ -1421,7 +1421,7 @@ protected:
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
         EXPECT_TRUE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
 
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 100, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
     }
 };
 
@@ -1538,11 +1538,11 @@ protected:
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
 
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
     }
 };
 
@@ -1581,11 +1581,11 @@ protected:
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(100, 200, 100, 100)));
         EXPECT_FALSE(occlusion.occluded(parent, IntRect(200, 200, 100, 100)));
 
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 50, 50, 50), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 100)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(0, 100, 300, 100)));
+        EXPECT_RECT_EQ(IntRect(200, 100, 50, 100), occlusion.unoccludedContentRect(parent, IntRect(200, 100, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(100, 200, 100, 50), occlusion.unoccludedContentRect(parent, IntRect(100, 200, 100, 100)));
     }
 };
 
@@ -1754,7 +1754,7 @@ protected:
             this->visitLayer(layer, occlusion);
             this->enterLayer(parent, occlusion);
 
-            EXPECT_INT_RECT_EQ(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+            EXPECT_RECT_EQ(IntRect(100, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
             EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
 
             EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
@@ -1770,7 +1770,7 @@ protected:
             this->visitLayer(layer, occlusion);
             this->enterLayer(parent, occlusion);
 
-            EXPECT_INT_RECT_EQ(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
+            EXPECT_RECT_EQ(IntRect(120, 120, 180, 180), occlusion.occlusionInScreenSpace().bounds());
             EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
 
             EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
@@ -1786,7 +1786,7 @@ protected:
             this->visitLayer(layer, occlusion);
             this->enterLayer(parent, occlusion);
 
-            EXPECT_INT_RECT_EQ(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
+            EXPECT_RECT_EQ(IntRect(250, 250, 50, 50), occlusion.occlusionInScreenSpace().bounds());
             EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
 
             EXPECT_FALSE(occlusion.occluded(parent, IntRect(0, 100, 100, 100)));
@@ -1815,7 +1815,7 @@ protected:
         this->enterLayer(layer, occlusion);
 
         // The layer is rotated in 3d but without preserving 3d, so it only gets resized.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
     }
 };
 
@@ -1880,7 +1880,7 @@ protected:
         TestCCOcclusionTrackerWithClip<typename Types::LayerType, typename Types::RenderSurfaceType> occlusion(IntRect(0, 0, 1000, 1000));
         this->enterLayer(layer, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 200, 200), occlusion.unoccludedContentRect(layer, IntRect(0, 0, 200, 200)));
     }
 };
 
@@ -1974,9 +1974,9 @@ protected:
         // Ensure that those pixels don't occlude things outside the clipRect.
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
     }
 };
@@ -2010,27 +2010,27 @@ protected:
         this->visitLayer(topmost, occlusion);
         this->enterLayer(parent2, occlusion);
         // This occlusion will affect all surfaces.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent2, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent2, IntRect(0, 0, 300, 300)));
         this->leaveLayer(parent2, occlusion);
 
         this->visitLayer(surfaceChild2, occlusion);
         this->enterLayer(surfaceChild, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
         this->leaveLayer(surfaceChild, occlusion);
         this->enterLayer(surface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
         this->leaveLayer(surface, occlusion);
 
         this->enterContributingSurface(surface, occlusion);
         // Occlusion within the surface is lost when leaving the animating surface.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
         this->leaveContributingSurface(surface, occlusion);
 
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
 
         // Occlusion is not added for the animating |layer|.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
     }
 };
 
@@ -2062,27 +2062,27 @@ protected:
         this->visitLayer(topmost, occlusion);
         this->enterLayer(parent2, occlusion);
         // This occlusion will affect all surfaces.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
         this->leaveLayer(parent2, occlusion);
 
         this->visitLayer(surfaceChild2, occlusion);
         this->enterLayer(surfaceChild, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(100, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 300, 300)));
         this->leaveLayer(surfaceChild, occlusion);
         this->enterLayer(surface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(200, 0, 50, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
         this->leaveLayer(surface, occlusion);
 
         this->enterContributingSurface(surface, occlusion);
         // Occlusion within the surface is lost when leaving the animating surface.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
         this->leaveContributingSurface(surface, occlusion);
 
         this->visitLayer(layer, occlusion);
         this->enterLayer(parent, occlusion);
 
         // Occlusion is not added for the animating |layer|.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
     }
 };
 
@@ -2120,7 +2120,7 @@ protected:
         this->visitLayer(surface2, occlusion);
         this->enterContributingSurface(surface2, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
 
         this->leaveContributingSurface(surface2, occlusion);
@@ -2128,53 +2128,53 @@ protected:
 
         // surfaceChild2 is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
         // It also means that things occluding in screen space (e.g. surface2) cannot occlude this layer.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild2, IntRect(0, 0, 100, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.unoccludedContentRect(surfaceChild2, IntRect(0, 0, 100, 300)));
         EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
 
         this->leaveLayer(surfaceChild2, occlusion);
         this->enterLayer(surfaceChild, occlusion);
         EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 100, 300)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
 
         // The surfaceChild is occluded by the surfaceChild2, but is moving relative its target and the screen, so it
         // can't be occluded.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 200, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 200, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 200, 300), occlusion.unoccludedContentRect(surfaceChild, IntRect(0, 0, 200, 300)));
         EXPECT_FALSE(occlusion.occluded(surfaceChild, IntRect(0, 0, 50, 300)));
 
         this->leaveLayer(surfaceChild, occlusion);
         this->enterLayer(surface, occlusion);
         // The surfaceChild is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 300), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(100, 0, 200, 300), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
 
         this->leaveLayer(surface, occlusion);
         // The surface's owning layer is moving in screen space but not relative to its target, so occlusion should happen in its target space only.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 300), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContentRect(surface, IntRect(0, 0, 300, 300)));
 
         this->enterContributingSurface(surface, occlusion);
         // The contributing |surface| is animating so it can't be occluded.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 300), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 300, 300)));
         this->leaveContributingSurface(surface, occlusion);
 
         this->enterLayer(layer, occlusion);
         // The |surface| is moving in the screen and in its target, so all occlusion within the surface is lost when leaving it.
-        EXPECT_INT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
         this->leaveLayer(layer, occlusion);
 
         this->enterLayer(parent, occlusion);
         // The |layer| is animating in the screen and in its target, so no occlusion is added.
-        EXPECT_INT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
+        EXPECT_RECT_EQ(IntRect(50, 0, 250, 300), occlusion.unoccludedContentRect(parent, IntRect(0, 0, 300, 300)));
     }
 };
 
@@ -2202,9 +2202,9 @@ protected:
         this->visitLayer(surface2, occlusion);
         this->visitContributingSurface(surface2, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(50, 50, 200, 200), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // Clear any stored occlusion.
@@ -2214,9 +2214,9 @@ protected:
         this->visitLayer(surface, occlusion);
         this->visitContributingSurface(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 400, 400), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -2239,9 +2239,9 @@ protected:
         this->visitLayer(surface, occlusion);
         this->visitContributingSurface(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 200), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -2265,22 +2265,22 @@ protected:
         // |topmost| occludes the replica, but not the surface itself.
         this->visitLayer(topmost, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 100, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->enterContributingSurface(surface, occlusion);
 
         // Surface is not occluded so it shouldn't think it is.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
     }
 };
 
@@ -2303,23 +2303,23 @@ protected:
         // |topmost| occludes the surface, but not the entire surface's replica.
         this->visitLayer(topmost, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 110), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->enterContributingSurface(surface, occlusion);
 
         // Surface is occluded, but only the top 10px of the replica.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 10, 100, 90), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 10, 100, 90), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
     }
 };
 
@@ -2344,23 +2344,23 @@ protected:
         this->visitLayer(overReplica, occlusion);
         this->visitLayer(overSurface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 200), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(surface, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->enterContributingSurface(surface, occlusion);
 
         // Surface and replica are occluded different amounts.
-        EXPECT_INT_RECT_EQ(IntRect(40, 0, 60, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(50, 0, 50, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(40, 0, 60, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(50, 0, 50, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, true, IntRect(0, 0, 100, 100)));
     }
 };
 
@@ -2384,18 +2384,18 @@ protected:
         // |topmost| occludes everything partially so we know occlusion is happening at all.
         this->visitLayer(topmost, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(surfaceChild, occlusion);
 
         // surfaceChild increases the occlusion in the screen by a narrow sliver.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
         // In its own surface, surfaceChild is at 0,0 as is its occlusion.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
@@ -2405,20 +2405,20 @@ protected:
         this->enterContributingSurface(surfaceChild, occlusion);
         // The surfaceChild's parent does not have a clipRect as it owns a render surface. Make sure the unoccluded rect
         // does not get clipped away inappropriately.
-        EXPECT_INT_RECT_EQ(IntRect(0, 40, 100, 10), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 50)));
+        EXPECT_RECT_EQ(IntRect(0, 40, 100, 10), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 50)));
         this->leaveContributingSurface(surfaceChild, occlusion);
 
         // When the surfaceChild's occlusion is transformed up to its parent, make sure it is not clipped away inappropriately also.
         this->enterLayer(surface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 60), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 10, 100, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 10, 100, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
         this->leaveLayer(surface, occlusion);
 
         this->enterContributingSurface(surface, occlusion);
         // The surface's parent does have a clipRect as it is the root layer.
-        EXPECT_INT_RECT_EQ(IntRect(0, 50, 100, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 50, 100, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
     }
 };
 
@@ -2444,7 +2444,7 @@ protected:
             // The root layer always has a clipRect. So the parent of |surface| has a clipRect giving the surface itself a clipRect.
             this->enterContributingSurface(surface, occlusion);
             // Make sure the parent's clipRect clips the unoccluded region of the child surface.
-            EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
+            EXPECT_RECT_EQ(IntRect(0, 0, 100, 200), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
         }
         this->resetLayerIterator();
         {
@@ -2456,7 +2456,7 @@ protected:
             // The root layer always has a clipRect. So the parent of |surface| has a clipRect giving the surface itself a clipRect.
             this->enterContributingSurface(surface, occlusion);
             // Make sure the viewport rect clips the unoccluded region of the child surface.
-            EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
+            EXPECT_RECT_EQ(IntRect(0, 0, 100, 100), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 300)));
         }
     }
 };
@@ -2483,17 +2483,17 @@ protected:
         // |topmost| occludes everything partially so we know occlusion is happening at all.
         this->visitLayer(topmost, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         // surfaceChild is not opaque and does not occlude, so we have a non-empty unoccluded area on surface.
         this->visitLayer(surfaceChild, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 80, 50), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The root layer always has a clipRect. So the parent of |surface| has a clipRect. However, the owning layer for |surface| does not
@@ -2502,13 +2502,13 @@ protected:
 
         this->enterContributingSurface(surfaceChild, occlusion);
         // The surfaceChild's parent does not have a clipRect as it owns a render surface.
-        EXPECT_INT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surfaceChild, false, IntRect(0, 0, 100, 100)));
         this->leaveContributingSurface(surfaceChild, occlusion);
 
         this->visitLayer(surface, occlusion);
         this->enterContributingSurface(surface, occlusion);
         // The surface's parent does have a clipRect as it is the root layer.
-        EXPECT_INT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 50, 80, 50), occlusion.unoccludedContributingSurfaceContentRect(surface, false, IntRect(0, 0, 100, 100)));
     }
 };
 
@@ -2556,28 +2556,28 @@ protected:
         this->visitLayer(occludingLayer2, occlusion);
         this->visitLayer(occludingLayer1, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
 
         // Everything outside the surface/replica is occluded but the surface/replica itself is not.
         this->enterLayer(filteredSurface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 100, 100)));
-
-        EXPECT_INT_RECT_EQ(IntRect(300 + 1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 1, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(300 + 0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, 1, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(300 + 0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 - 1, 0, 100, 100)));
-        EXPECT_INT_RECT_EQ(IntRect(300 + 0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, -1, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 100, 100)));
+
+        EXPECT_RECT_EQ(IntRect(300 + 1, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 1, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(300 + 0, 1, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, 1, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(300 + 0, 0, 99, 100), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 - 1, 0, 100, 100)));
+        EXPECT_RECT_EQ(IntRect(300 + 0, 0, 100, 99), occlusion.unoccludedContentRect(filteredSurface, IntRect(300 + 0, -1, 100, 100)));
         this->leaveLayer(filteredSurface, occlusion);
 
         // The filtered layer/replica does not occlude.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
@@ -2585,9 +2585,9 @@ protected:
         this->visitContributingSurface(filteredSurface, occlusion);
 
         this->enterLayer(parent, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
 
         IntRect outsetRect;
@@ -2596,44 +2596,44 @@ protected:
         // Nothing in the blur outsets for the filteredSurface is occluded.
         outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
         testRect = outsetRect;
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
 
         // Stuff outside the blur outsets is still occluded though.
         testRect = outsetRect;
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.move(-1, 0);
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.move(0, -1);
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
 
         // Nothing in the blur outsets for the filteredSurface's replica is occluded.
         outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
         testRect = outsetRect;
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
 
         // Stuff outside the blur outsets is still occluded though.
         testRect = outsetRect;
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.move(-1, 0);
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
         testRect = outsetRect;
         testRect.move(0, -1);
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
+        EXPECT_RECT_EQ(outsetRect, occlusion.unoccludedContentRect(parent, testRect));
     }
 };
 
@@ -2671,9 +2671,9 @@ protected:
         occlusion.setLayerClipRect(IntRect(0, 0, 1000, 1000));
 
         this->visitLayer(occludingLayerAbove, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(100 / 2, 100 / 2, 50 / 2, 50 / 2), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(100 / 2, 100 / 2, 50 / 2, 50 / 2), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(100, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(100, 100, 50, 50), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
 
         this->visitLayer(filteredSurface2, occlusion);
@@ -2686,7 +2686,7 @@ protected:
 
         // Test expectations in the target.
         IntRect expectedOcclusion = IntRect(100 + outsetRight * 2, 100 + outsetBottom * 2, 50 - (outsetLeft + outsetRight) * 2, 50 - (outsetTop + outsetBottom) * 2);
-        EXPECT_INT_RECT_EQ(expectedOcclusion, occlusion.occlusionInTargetSurface().rects()[0]);
+        EXPECT_RECT_EQ(expectedOcclusion, occlusion.occlusionInTargetSurface().rects()[0]);
 
         // Test expectations in the screen. Take the ceiling of half of the outsets.
         outsetTop = (outsetTop + 1) / 2;
@@ -2695,7 +2695,7 @@ protected:
         outsetLeft = (outsetLeft + 1) / 2;
         expectedOcclusion = IntRect(100 / 2 + outsetRight * 2, 100 / 2 + outsetBottom * 2, 50 / 2 - (outsetLeft + outsetRight) * 2, 50 /2 - (outsetTop + outsetBottom) * 2);
 
-        EXPECT_INT_RECT_EQ(expectedOcclusion, occlusion.occlusionInScreenSpace().rects()[0]);
+        EXPECT_RECT_EQ(expectedOcclusion, occlusion.occlusionInScreenSpace().rects()[0]);
     }
 };
 
@@ -2742,28 +2742,28 @@ protected:
         this->visitLayer(occludingLayer2, occlusion);
         this->visitLayer(occludingLayer1, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInTargetSurface().rects().size());
 
         // Everything outside the surface/replica is occluded but the surface/replica itself is not.
         this->enterLayer(filteredSurface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 50, 50)));
-
-        EXPECT_INT_RECT_EQ(IntRect(150 + 1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 1, 0, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(150 + 0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, 1, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(150 + 0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 - 1, 0, 50, 50)));
-        EXPECT_INT_RECT_EQ(IntRect(150 + 0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, -1, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(1, 0, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, 1, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(-1, 0, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(0, -1, 50, 50)));
+
+        EXPECT_RECT_EQ(IntRect(150 + 1, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 1, 0, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(150 + 0, 1, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, 1, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(150 + 0, 0, 49, 50), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 - 1, 0, 50, 50)));
+        EXPECT_RECT_EQ(IntRect(150 + 0, 0, 50, 49), occlusion.unoccludedContentRect(filteredSurface, IntRect(150 + 0, -1, 50, 50)));
         this->leaveLayer(filteredSurface, occlusion);
 
         // The filtered layer/replica does not occlude.
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 0, 0), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The surface has a background blur, so it needs pixels that are currently considered occluded in order to be drawn. So the pixels
@@ -2771,7 +2771,7 @@ protected:
         this->visitContributingSurface(filteredSurface, occlusion);
 
         this->enterContributingSurface(clippingSurface, occlusion);
-        EXPECT_INT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(0, 0, 300, 150), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(5u, occlusion.occlusionInScreenSpace().rects().size());
 
         IntRect outsetRect;
@@ -2782,45 +2782,45 @@ protected:
         outsetRect = IntRect(50 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
         clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
         testRect = outsetRect;
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
 
         // Stuff outside the (clipped) blur outsets is still occluded though.
         testRect = outsetRect;
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.move(-1, 0);
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.move(0, -1);
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
 
         // Nothing in the (clipped) blur outsets for the filteredSurface's replica is occluded.
         outsetRect = IntRect(200 - outsetLeft, 50 - outsetTop, 50 + outsetLeft + outsetRight, 50 + outsetTop + outsetBottom);
         clippedOutsetRect = intersection(outsetRect, IntRect(0 - outsetLeft, 0 - outsetTop, 300 + outsetLeft + outsetRight, 70 + outsetTop + outsetBottom));
         testRect = outsetRect;
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
 
         // Stuff outside the (clipped) blur outsets is still occluded though.
         testRect = outsetRect;
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.move(-1, 0);
         testRect.expand(1, 0);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
         testRect = outsetRect;
         testRect.move(0, -1);
         testRect.expand(0, 1);
-        EXPECT_INT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
+        EXPECT_RECT_EQ(clippedOutsetRect, occlusion.unoccludedContentRect(clippingSurface, testRect));
     }
 };
 
@@ -2866,9 +2866,9 @@ protected:
         IntRect occlusionBehindReplica = IntRect(210, 60, 30, 30);
 
         IntRect expectedOpaqueBounds = unionRect(occlusionBehindSurface, occlusionBehindReplica);
-        EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -2914,9 +2914,9 @@ protected:
         IntRect occlusionAboveReplica = IntRect(200, 50, 50, 50);
 
         IntRect expectedOpaqueBounds = unionRect(occlusionAboveSurface, occlusionAboveReplica);
-        EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(expectedOpaqueBounds, occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(2u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
@@ -3015,17 +3015,17 @@ protected:
         // The small layer is not tracked because it is too small.
         this->visitLayer(small, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(0u, occlusion.occlusionInTargetSurface().rects().size());
 
         // The large layer is tracked as it is large enough.
         this->visitLayer(large, occlusion);
 
-        EXPECT_INT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInScreenSpace().bounds());
+        EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInScreenSpace().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
-        EXPECT_INT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInTargetSurface().bounds());
+        EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInTargetSurface().bounds());
         EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
     }
 };
index 05cd4c7..118c129 100644 (file)
@@ -27,7 +27,7 @@
 #include "ContentLayerChromium.h"
 
 #include "BitmapCanvasLayerTextureUpdater.h"
-#include "CCLayerTreeTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "CCRenderingStats.h"
 #include "ContentLayerChromiumClient.h"
 #include "GraphicsContext.h"
@@ -106,7 +106,7 @@ TEST(ContentLayerChromiumTest, ContentLayerPainterWithDeviceScale)
     CCRenderingStats stats;
     updater->prepareToUpdate(contentRect, IntSize(256, 256), contentsScale, contentsScale, resultingOpaqueRect, stats);
 
-    EXPECT_INT_RECT_EQ(opaqueRectInContentSpace, resultingOpaqueRect);
+    EXPECT_RECT_EQ(opaqueRectInContentSpace, resultingOpaqueRect);
 }
 
 } // namespace
index 0e6eb0e..1283c79 100644 (file)
@@ -26,9 +26,9 @@
 
 #include "LayerChromium.h"
 
+#include "CCGeometryTestUtils.h"
 #include "CCLayerImpl.h"
 #include "CCLayerTreeHost.h"
-#include "CCLayerTreeTestCommon.h"
 #include "CCSingleThreadProxy.h"
 #include "FakeCCLayerTreeHostClient.h"
 #include "LayerPainterChromium.h"
index 69e9c75..d9b9ea9 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "BitmapCanvasLayerTextureUpdater.h"
 #include "CCAnimationTestCommon.h"
-#include "CCLayerTreeTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include "CCOverdrawMetrics.h"
 #include "CCRenderingStats.h"
 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread
@@ -46,12 +46,6 @@ using namespace WebKitTests;
 using namespace WTF;
 using WebKit::WebTransformationMatrix;
 
-#define EXPECT_EQ_RECT(a, b) \
-    EXPECT_EQ(a.x(), b.x()); \
-    EXPECT_EQ(a.y(), b.y()); \
-    EXPECT_EQ(a.width(), b.width()); \
-    EXPECT_EQ(a.height(), b.height());
-
 namespace {
 
 class TestCCOcclusionTracker : public CCOcclusionTracker {
@@ -1225,7 +1219,7 @@ TEST_F(TiledLayerChromiumTest, visibleContentOpaqueRegion)
     layer->update(m_queue, &occluded, m_stats);
     updateTextures();
     opaqueContents = layer->visibleContentOpaqueRegion();
-    EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
+    EXPECT_RECT_EQ(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
     EXPECT_EQ(1u, opaqueContents.rects().size());
 
     EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2, 1);
@@ -1238,7 +1232,7 @@ TEST_F(TiledLayerChromiumTest, visibleContentOpaqueRegion)
     layer->update(m_queue, &occluded, m_stats);
     updateTextures();
     opaqueContents = layer->visibleContentOpaqueRegion();
-    EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
+    EXPECT_RECT_EQ(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
     EXPECT_EQ(1u, opaqueContents.rects().size());
 
     EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2, 1);
@@ -1253,7 +1247,7 @@ TEST_F(TiledLayerChromiumTest, visibleContentOpaqueRegion)
     layer->update(m_queue, &occluded, m_stats);
     updateTextures();
     opaqueContents = layer->visibleContentOpaqueRegion();
-    EXPECT_EQ_RECT(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
+    EXPECT_RECT_EQ(intersection(opaquePaintRect, visibleBounds), opaqueContents.bounds());
     EXPECT_EQ(1u, opaqueContents.rects().size());
 
     EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2 + 1, 1);
@@ -1268,7 +1262,7 @@ TEST_F(TiledLayerChromiumTest, visibleContentOpaqueRegion)
     layer->update(m_queue, &occluded, m_stats);
     updateTextures();
     opaqueContents = layer->visibleContentOpaqueRegion();
-    EXPECT_EQ_RECT(intersection(IntRect(10, 100, 90, 100), visibleBounds), opaqueContents.bounds());
+    EXPECT_RECT_EQ(intersection(IntRect(10, 100, 90, 100), visibleBounds), opaqueContents.bounds());
     EXPECT_EQ(1u, opaqueContents.rects().size());
 
     EXPECT_NEAR(occluded.overdrawMetrics().pixelsPainted(), 20000 * 2 + 1  + 1, 1);
@@ -1539,14 +1533,14 @@ TEST_F(TiledLayerChromiumTest, nonIntegerContentsScaleIsNotDistortedDuringPaint)
     layer->update(m_queue, 0, m_stats);
     layer->trackingLayerPainter()->resetPaintedRect();
 
-    EXPECT_INT_RECT_EQ(IntRect(), layer->trackingLayerPainter()->paintedRect());
+    EXPECT_RECT_EQ(IntRect(), layer->trackingLayerPainter()->paintedRect());
     updateTextures();
 
     // Invalidate the entire layer in content space. When painting, the rect given to webkit should match the layer's bounds.
     layer->invalidateContentRect(contentRect);
     layer->update(m_queue, 0, m_stats);
 
-    EXPECT_INT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
+    EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
 }
 
 TEST_F(TiledLayerChromiumTest, nonIntegerContentsScaleIsNotDistortedDuringInvalidation)
@@ -1569,14 +1563,14 @@ TEST_F(TiledLayerChromiumTest, nonIntegerContentsScaleIsNotDistortedDuringInvali
     layer->update(m_queue, 0, m_stats);
     layer->trackingLayerPainter()->resetPaintedRect();
 
-    EXPECT_INT_RECT_EQ(IntRect(), layer->trackingLayerPainter()->paintedRect());
+    EXPECT_RECT_EQ(IntRect(), layer->trackingLayerPainter()->paintedRect());
     updateTextures();
 
     // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds.
     layer->setNeedsDisplayRect(layerRect);
     layer->update(m_queue, 0, m_stats);
 
-    EXPECT_INT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
+    EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
 }
 
 } // namespace
index 9e4f75a..d54db21 100644 (file)
 
 #include <public/WebTransformOperations.h>
 
-#include <public/WebTransformationMatrix.h>
-
-#include "CCLayerTreeTestCommon.h"
-
+#include "CCGeometryTestUtils.h"
 #include <gtest/gtest.h>
+#include <public/WebTransformationMatrix.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
index eb442f4..a587e4a 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <public/WebTransformationMatrix.h>
 
-#include "CCLayerTreeTestCommon.h"
+#include "CCGeometryTestUtils.h"
 #include <gtest/gtest.h>
 #include <wtf/MathExtras.h>