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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issues from previous review comment. Created 6 years, 9 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/immersive_fullscreen_controller.h » ('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 8ee70eccd3ffbeed02a43d5b489d9f83e4393efc..7b3b5d8371cc80034d1030deaca51099787a370f 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -1504,35 +1504,41 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
widget->Show();
widget->Maximize();
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+
aura::Window* window = widget->GetNativeWindow();
shelf->LayoutShelf();
gfx::Rect shelf_shown = GetShelfWidget()->GetWindowBoundsInScreen();
gfx::Rect bounds_shelf = window->bounds();
+
+ // Edge swipe when SHELF_VISIBLE should not change visibility state.
+ EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
+ generator.GestureEdgeSwipe();
EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
+ // Edge swipe when AUTO_HIDE_HIDDEN should change to AUTO_HIDE_SHOWN.
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
shelf->LayoutShelf();
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
-
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.GestureEdgeSwipe();
-
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
+ EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
widget->SetFullscreen(true);
wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
shelf->UpdateVisibilityState();
- gfx::Rect bounds_fullscreen = window->bounds();
+ // 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_VISIBLE, shelf->visibility_state());
- EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
- EXPECT_FALSE(widget->IsFullscreen());
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
+ EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
+ EXPECT_TRUE(widget->IsFullscreen());
}
#if defined(OS_WIN)
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/wm/immersive_fullscreen_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698