diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-10 01:20:18 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-10 01:20:18 +0000 |
commit | 2b433bdbceedb03ceb8d3cb85d5aed77e8319b03 (patch) | |
tree | 92c12bed6c9d7fabc7c7c858ded4537ffadcc9df /ash/tooltips | |
parent | b8f0d0daa59b11aa8303952fe34a82471d6c3015 (diff) | |
download | chromium_src-2b433bdbceedb03ceb8d3cb85d5aed77e8319b03.zip chromium_src-2b433bdbceedb03ceb8d3cb85d5aed77e8319b03.tar.gz chromium_src-2b433bdbceedb03ceb8d3cb85d5aed77e8319b03.tar.bz2 |
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
Diffstat (limited to 'ash/tooltips')
-rw-r--r-- | ash/tooltips/tooltip_controller_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc index 995f889..d48db06 100644 --- a/ash/tooltips/tooltip_controller_unittest.cc +++ b/ash/tooltips/tooltip_controller_unittest.cc @@ -194,7 +194,7 @@ TEST_F(TooltipControllerTest, TooltipsInMultipleViews) { view1->bounds().CenterPoint()); FireTooltipTimer(); EXPECT_TRUE(IsTooltipVisible()); - for (int i = 0; i < 50; i++) { + for (int i = 0; i < 49; ++i) { generator.MoveMouseBy(1, 0); EXPECT_TRUE(IsTooltipVisible()); EXPECT_EQ(window, @@ -205,7 +205,7 @@ TEST_F(TooltipControllerTest, TooltipsInMultipleViews) { EXPECT_EQ(expected_tooltip, GetTooltipText()); EXPECT_EQ(window, GetTooltipWindow()); } - for (int i = 0; i < 50; i++) { + for (int i = 0; i < 49; ++i) { generator.MoveMouseBy(1, 0); EXPECT_FALSE(IsTooltipVisible()); EXPECT_EQ(window, @@ -397,7 +397,7 @@ TEST_F(TooltipControllerTest, TooltipHidesOnKeyPressAndStaysHiddenUntilChange) { // Moving the mouse inside |view1| should not change the state of the tooltip // or the timers. - for (int i = 0; i < 50; i++) { + for (int i = 0; i < 49; i++) { generator.MoveMouseBy(1, 0); EXPECT_FALSE(IsTooltipVisible()); EXPECT_FALSE(IsTooltipTimerRunning()); @@ -452,7 +452,7 @@ TEST_F(TooltipControllerTest, TooltipHidesOnTimeoutAndStaysHiddenUntilChange) { // Moving the mouse inside |view1| should not change the state of the tooltip // or the timers. - for (int i = 0; i < 50; i++) { + for (int i = 0; i < 49; ++i) { generator.MoveMouseBy(1, 0); EXPECT_FALSE(IsTooltipVisible()); EXPECT_FALSE(IsTooltipTimerRunning()); |