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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 247363005: Fullscreen/immersive mode is allowed in touch view mode, the shelf gets hidden and an edge swipe br… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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/shelf/shelf_layout_manager.cc ('k') | ash/wm/default_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index b388735876ac6711da9a48be8d55b1a7e18273d3..7c8b9f7cf3f3bb7b5fa84fa5917ba2891afaff69 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -1570,6 +1570,39 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
EXPECT_TRUE(widget->IsFullscreen());
}
+// Test that starting the maximize mode does still allow the shelf to be made
+// visible when an (immersive mode) full screen app is running.
+TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipeInMaximizeMode) {
+ ShelfLayoutManager* shelf = GetShelfLayoutManager();
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
+ views::Widget* widget = new views::Widget;
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
+ params.bounds = gfx::Rect(0, 0, 200, 200);
+ params.context = CurrentContext();
+ widget->Init(params);
+ widget->Show();
+ aura::Window* window = widget->GetNativeWindow();
+ wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
+ widget->SetFullscreen(true);
+
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+
+ // The maximize mode gets started.
+ shelf->OnMaximizeModeStarted();
+ shelf->LayoutShelf();
+ shelf->UpdateVisibilityState();
+
+ // Edge swipe in fullscreen + AUTO_HIDE_HIDDEN should show the shelf and
+ // remain fullscreen.
+ EXPECT_TRUE(widget->IsFullscreen());
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
+ EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
+ generator.GestureEdgeSwipe();
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
+ EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
+ EXPECT_TRUE(widget->IsFullscreen());
+}
+
// Check that in maximize mode gesture swipes on the shelf have no effect.
TEST_F(ShelfLayoutManagerTest, MaximizeModeGestureEdgeSwipe) {
ShelfLayoutManager* shelf = GetShelfLayoutManager();
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/wm/default_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698