| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shelf/shelf_view.h" | 5 #include "ash/shelf/shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 gfx::Point(all_area.right(), all_area.y()))); | 1294 gfx::Point(all_area.right(), all_area.y()))); |
| 1295 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( | 1295 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( |
| 1296 gfx::Point(all_area.x() - 1, all_area.y()))); | 1296 gfx::Point(all_area.x() - 1, all_area.y()))); |
| 1297 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( | 1297 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( |
| 1298 gfx::Point(all_area.x(), all_area.y() - 1))); | 1298 gfx::Point(all_area.x(), all_area.y() - 1))); |
| 1299 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( | 1299 EXPECT_TRUE(shelf_view_->ShouldHideTooltip( |
| 1300 gfx::Point(all_area.x(), all_area.bottom()))); | 1300 gfx::Point(all_area.x(), all_area.bottom()))); |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) { | 1303 TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) { |
| 1304 Shell::GetInstance()->ToggleAppList(NULL); | 1304 Shell::GetInstance()->ShowAppList(NULL); |
| 1305 ASSERT_TRUE(Shell::GetInstance()->GetAppListWindow()); | 1305 ASSERT_TRUE(Shell::GetInstance()->GetAppListWindow()); |
| 1306 | 1306 |
| 1307 // The tooltip shouldn't hide if the mouse is on normal buttons. | 1307 // The tooltip shouldn't hide if the mouse is on normal buttons. |
| 1308 for (int i = 1; i < test_api_->GetButtonCount(); i++) { | 1308 for (int i = 1; i < test_api_->GetButtonCount(); i++) { |
| 1309 ShelfButton* button = test_api_->GetButton(i); | 1309 ShelfButton* button = test_api_->GetButton(i); |
| 1310 if (!button) | 1310 if (!button) |
| 1311 continue; | 1311 continue; |
| 1312 | 1312 |
| 1313 EXPECT_FALSE(shelf_view_->ShouldHideTooltip( | 1313 EXPECT_FALSE(shelf_view_->ShouldHideTooltip( |
| 1314 button->GetMirroredBounds().CenterPoint())) | 1314 button->GetMirroredBounds().CenterPoint())) |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 test_api_->RunMessageLoopUntilAnimationsDone(); | 1669 test_api_->RunMessageLoopUntilAnimationsDone(); |
| 1670 CheckAllItemsAreInBounds(); | 1670 CheckAllItemsAreInBounds(); |
| 1671 } | 1671 } |
| 1672 | 1672 |
| 1673 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); | 1673 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); |
| 1674 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, | 1674 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, |
| 1675 testing::Bool()); | 1675 testing::Bool()); |
| 1676 | 1676 |
| 1677 } // namespace test | 1677 } // namespace test |
| 1678 } // namespace ash | 1678 } // namespace ash |
| OLD | NEW |