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

Unified Diff: athena/home/home_card_unittest.cc

Issue 566753003: Hide the virtual keyboard when entering to overview mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: home card Created 6 years, 3 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 | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/home_card_unittest.cc
diff --git a/athena/home/home_card_unittest.cc b/athena/home/home_card_unittest.cc
index b7e97803caee713a78d523df7e1181e0bbdcfbab..518b4206a72495cfd2a53f3c9c1745a2352070d8 100644
--- a/athena/home/home_card_unittest.cc
+++ b/athena/home/home_card_unittest.cc
@@ -18,6 +18,7 @@
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/shadow_types.h"
+#include "ui/wm/core/window_util.h"
namespace athena {
@@ -82,10 +83,21 @@ TEST_F(HomeCardTest, VirtualKeyboardTransition) {
HomeCard::Get()->UpdateVirtualKeyboardBounds(gfx::Rect());
EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState());
+}
- // Overview mode has to finish before ending test, otherwise it crashes.
- // TODO(mukai): fix this.
+TEST_F(HomeCardTest, ToggleOverviewWithVirtualKeyboard) {
+ // Minimized -> Hidden for virtual keyboard.
+ EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, HomeCard::Get()->GetState());
+ const gfx::Rect vk_bounds(0, 0, 100, 100);
+ HomeCard::Get()->UpdateVirtualKeyboardBounds(vk_bounds);
+ EXPECT_EQ(HomeCard::HIDDEN, HomeCard::Get()->GetState());
+
+ // Toogle overview revives the home card to bottom. Also home card gets
pkotwicz 2014/09/11 23:43:16 How about: "Toggling overview revives the bottom h
Jun Mukai 2014/09/11 23:55:02 Done.
+ // active, which will close the virtual keyboard.
WindowManager::GetInstance()->ToggleOverview();
+ EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, HomeCard::Get()->GetState());
+ aura::Window* home_card = GetHomeCardWindow();
+ EXPECT_TRUE(wm::IsActiveWindow(home_card));
}
// Verify if the home card is correctly minimized after app launch.
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698