From 2b433bdbceedb03ceb8d3cb85d5aed77e8319b03 Mon Sep 17 00:00:00 2001
From: "cpu@chromium.org"
 <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 10 Oct 2012 01:20:18 +0000
Subject: Revert 160993 - Revert 160976 - The center of a rect is x+width/2,
 y+height/2

If a rect is (0, 0, 5, 5) the center should be 2.5, 2.5, not 2, 2.

Tests:
ui_unittests:RectTest.CenterPoint
ui_unittests:RectTest.CenterPointF

BUG=147395

Review URL: https://chromiumcodereview.appspot.com/11065050

TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/11086037

TBR=cpu@chromium.org
Review URL: https://codereview.chromium.org/11088048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160995 0039d316-1c4b-4281-b951-d872f2087c98
---
 ui/aura/gestures/gesture_recognizer_unittest.cc | 12 ++++++------
 ui/aura/root_window_unittest.cc                 |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'ui/aura')

diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index 788fbf4..22cab46 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -571,8 +571,8 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
      gfx::Point actual_point(delegate->tap_location());
      EXPECT_EQ(24, delegate->bounding_box().width());
      EXPECT_EQ(24, delegate->bounding_box().height());
-     EXPECT_EQ(100, actual_point.x());
-     EXPECT_EQ(200, actual_point.y());
+     EXPECT_EQ(101, actual_point.x());
+     EXPECT_EQ(201, actual_point.y());
   }
 
   // Test with no ET_TOUCH_MOVED events but different touch points and radii.
@@ -615,8 +615,8 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
      gfx::Point actual_point(delegate->tap_location());
      EXPECT_EQ(40, delegate->bounding_box().width());
      EXPECT_EQ(40, delegate->bounding_box().height());
-     EXPECT_EQ(366, actual_point.x());
-     EXPECT_EQ(290, actual_point.y());
+     EXPECT_EQ(367, actual_point.x());
+     EXPECT_EQ(291, actual_point.y());
   }
 
   // Test with a single ET_TOUCH_MOVED event.
@@ -678,7 +678,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
      EXPECT_EQ(25, delegate->bounding_box().width());
      EXPECT_EQ(24, delegate->bounding_box().height());
      EXPECT_EQ(48, actual_point.x());
-     EXPECT_EQ(203, actual_point.y());
+     EXPECT_EQ(204, actual_point.y());
   }
 
   // Test with a few ET_TOUCH_MOVED events.
@@ -773,7 +773,7 @@ TEST_F(GestureRecognizerTest, GestureEventTapRegion) {
      EXPECT_EQ(33, delegate->bounding_box().width());
      EXPECT_EQ(32, delegate->bounding_box().height());
      EXPECT_EQ(397, actual_point.x());
-     EXPECT_EQ(148, actual_point.y());
+     EXPECT_EQ(149, actual_point.y());
   }
 }
 
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index cc7a729..5c8f3f7 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -360,7 +360,7 @@ TEST_F(RootWindowTest, CanProcessEventsWithinSubtree) {
                                                 client.GetNonLockWindow());
   w2->set_id(2);
   scoped_ptr<Window> w3(
-      test::CreateTestWindowWithDelegate(&d, 3, gfx::Rect(20, 20, 20, 20),
+      test::CreateTestWindowWithDelegate(&d, 3, gfx::Rect(30, 30, 20, 20),
                                          client.GetLockWindow()));
 
   w1->Focus();
-- 
cgit v1.1