Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2181)

Unified Diff: ash/launcher/launcher_view_unittest.cc

Issue 10824059: Fixees launcher tooltip animation settings and its finer visibility bugs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_view_unittest.cc
diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc
index 51e1af0d1920a230c4345d51eb42722f354d4011..5868352eb9a27cce8c9960ec4427fd7d1bdbf456 100644
--- a/ash/launcher/launcher_view_unittest.cc
+++ b/ash/launcher/launcher_view_unittest.cc
@@ -167,13 +167,13 @@ class MockLauncherDelegate : public ash::LauncherDelegate {
}
};
-class LauncherViewTest : public aura::test::AuraTestBase {
+class LauncherViewTest : public AshTestBase {
public:
LauncherViewTest() {}
virtual ~LauncherViewTest() {}
virtual void SetUp() OVERRIDE {
- aura::test::AuraTestBase::SetUp();
+ AshTestBase::SetUp();
model_.reset(new LauncherModel);
@@ -187,6 +187,11 @@ class LauncherViewTest : public aura::test::AuraTestBase {
test_api_->SetAnimationDuration(1); // Speeds up animation for test.
}
+ virtual void TearDown() OVERRIDE {
+ launcher_view_.reset();
+ AshTestBase::TearDown();
+ }
+
protected:
LauncherID AddAppShortcut() {
LauncherItem item;
@@ -651,6 +656,24 @@ TEST_F(LauncherViewTest, ShouldHideTooltipTest) {
gfx::Point(all_area.x(), all_area.bottom())));
}
+TEST_F(LauncherViewTest, ShouldHideTooltipWithAppListWindowTest) {
+ Shell::GetInstance()->ToggleAppList();
+ ASSERT_TRUE(Shell::GetInstance()->GetAppListWindow());
+
+ // The tooltip shouldn't hide if the mouse is on normal buttons.
+ for (int i = 0; i < test_api_->GetButtonCount() - 1; i++) {
+ internal::LauncherButton* button = test_api_->GetButton(i);
+ EXPECT_FALSE(launcher_view_->ShouldHideTooltip(
+ button->GetMirroredBounds().CenterPoint()))
+ << "LauncherView tries to hide on button " << i;
+ }
+
+ // The tooltip should hide on the app-list button.
+ views::View* app_list_button = launcher_view_->GetAppListButtonView();
+ EXPECT_TRUE(launcher_view_->ShouldHideTooltip(
+ app_list_button->GetMirroredBounds().CenterPoint()));
+}
+
// Resizing launcher view while an add animation without fade-in is running,
// which happens when overflow happens. App list button should end up in its
// new ideal bounds.
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698