diff options
Diffstat (limited to 'athena/home/home_card_unittest.cc')
-rw-r--r-- | athena/home/home_card_unittest.cc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/athena/home/home_card_unittest.cc b/athena/home/home_card_unittest.cc index abbdbdf..d8a630f 100644 --- a/athena/home/home_card_unittest.cc +++ b/athena/home/home_card_unittest.cc @@ -28,12 +28,6 @@ aura::Window* GetHomeCardWindow() { GetHomeCardWindowForTest(); } -// Returns true if the keyboard focus is on the search box. -bool IsSearchBoxFocused(aura::Window* home_card) { - return views::Widget::GetWidgetForNativeWindow(home_card)-> - GetContentsView()->GetViewByID(kHomeCardSearchBoxId)->HasFocus(); -} - typedef test::AthenaTestBase HomeCardTest; TEST_F(HomeCardTest, BasicTransition) { @@ -265,35 +259,6 @@ TEST_F(HomeCardTest, GesturesToFullDirectly) { EXPECT_TRUE(WindowManager::Get()->IsOverviewModeActive()); } -TEST_F(HomeCardTest, KeyboardFocus) { - ASSERT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState()); - aura::Window* home_card = GetHomeCardWindow(); - ASSERT_FALSE(IsSearchBoxFocused(home_card)); - - WindowManager::Get()->EnterOverview(); - ASSERT_FALSE(IsSearchBoxFocused(home_card)); - - ui::test::EventGenerator generator(root_window()); - gfx::Rect screen_rect(root_window()->bounds()); - - const int bottom = screen_rect.bottom(); - const int x = screen_rect.x() + 1; - - generator.GestureScrollSequence(gfx::Point(x, bottom - 40), - gfx::Point(x, 10), - base::TimeDelta::FromSeconds(1), - 10); - EXPECT_EQ(HomeCard::VISIBLE_CENTERED, HomeCard::Get()->GetState()); - EXPECT_TRUE(IsSearchBoxFocused(home_card)); - - generator.GestureScrollSequence(gfx::Point(x, 10), - gfx::Point(x, bottom - 100), - base::TimeDelta::FromSeconds(1), - 10); - EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState()); - EXPECT_FALSE(IsSearchBoxFocused(home_card)); -} - TEST_F(HomeCardTest, DontMinimizeWithModalWindow) { aura::Window* home_card = GetHomeCardWindow(); |