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

Unified Diff: ash/system/ime_menu/ime_menu_tray_unittest.cc

Issue 2831233003: Remove ShouldBlockShelfAutoHide(). (Closed)
Patch Set: rename and rebase Created 3 years, 8 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/system/ime_menu/ime_menu_tray.cc ('k') | ash/system/palette/palette_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/ime_menu/ime_menu_tray_unittest.cc
diff --git a/ash/system/ime_menu/ime_menu_tray_unittest.cc b/ash/system/ime_menu/ime_menu_tray_unittest.cc
index 5de04e8c5a83ab651b321706950b3c214cb76f89..c759c18fb7bfc82cfeb500b2313b03fd91b0b915 100644
--- a/ash/system/ime_menu/ime_menu_tray_unittest.cc
+++ b/ash/system/ime_menu/ime_menu_tray_unittest.cc
@@ -137,11 +137,14 @@ TEST_F(ImeMenuTrayTest, TrayLabelTest) {
// Tests that IME menu tray changes background color when tapped/clicked. And
// tests that the background color becomes 'inactive' when disabling the IME
-// menu feature.
+// menu feature. Also makes sure that the shelf won't autohide as long as the
+// IME menu is open.
TEST_F(ImeMenuTrayTest, PerformAction) {
Shell::Get()->system_tray_notifier()->NotifyRefreshIMEMenu(true);
ASSERT_TRUE(IsVisible());
ASSERT_FALSE(IsTrayBackgroundActive());
+ StatusAreaWidget* status = StatusAreaWidgetTestHelper::GetStatusAreaWidget();
+ EXPECT_FALSE(status->ShouldShowShelf());
ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_TAP));
@@ -149,6 +152,10 @@ TEST_F(ImeMenuTrayTest, PerformAction) {
EXPECT_TRUE(IsTrayBackgroundActive());
EXPECT_TRUE(IsBubbleShown());
+ // Auto-hidden shelf would be forced to be visible as long as the bubble is
+ // open.
+ EXPECT_TRUE(status->ShouldShowShelf());
+
GetTray()->PerformAction(tap);
EXPECT_FALSE(IsTrayBackgroundActive());
EXPECT_FALSE(IsBubbleShown());
@@ -161,6 +168,7 @@ TEST_F(ImeMenuTrayTest, PerformAction) {
EXPECT_FALSE(IsVisible());
EXPECT_FALSE(IsBubbleShown());
EXPECT_FALSE(IsTrayBackgroundActive());
+ EXPECT_FALSE(status->ShouldShowShelf());
}
// Tests that IME menu list updates when changing the current IME. This should
« no previous file with comments | « ash/system/ime_menu/ime_menu_tray.cc ('k') | ash/system/palette/palette_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698