Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ash / wm / maximize_mode / maximize_mode_window_manager_unittest.cc
index 8dc5575..986d041 100644 (file)
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
 #include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
 #include "ui/aura/test/test_window_delegate.h"
 #include "ui/aura/test/test_windows.h"
 #include "ui/aura/window.h"
 #include "ui/base/hit_test.h"
+#include "ui/events/test/event_generator.h"
 
 namespace ash {
 
@@ -792,11 +792,11 @@ TEST_F(MaximizeModeWindowManagerTest, KeepFullScreenModeOn) {
   EXPECT_EQ(SHELF_HIDDEN, shelf->visibility_state());
 
   // With leaving the fullscreen mode, the maximized mode should return and the
-  // shelf should become visible.
+  // shelf should maintain its state from before maximize mode.
   window_state->OnWMEvent(&event);
   EXPECT_FALSE(window_state->IsFullscreen());
   EXPECT_TRUE(window_state->IsMaximized());
-  EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
+  EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
 
   // Ending the maximize mode should return to full screen and the shelf should
   // be hidden again.
@@ -825,10 +825,11 @@ TEST_F(MaximizeModeWindowManagerTest, AllowFullScreenMode) {
 
   CreateMaximizeModeWindowManager();
 
-  // Fullscreen mode should still be off and the shelf should be visible.
+  // Fullscreen mode should still be off and the shelf should maintain its
+  // state.
   EXPECT_FALSE(window_state->IsFullscreen());
   EXPECT_TRUE(window_state->IsMaximized());
-  EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
+  EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
 
   // After going into fullscreen mode, the shelf should be hidden.
   wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
@@ -945,7 +946,7 @@ TEST_F(MaximizeModeWindowManagerTest, TryToDesktopSizeDragUnmaximizable) {
 
   // 1. Move the mouse over the caption and check that dragging the window does
   // change the location.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   generator.MoveMouseTo(gfx::Point(rect.x() + 2, rect.y() + 2));
   generator.PressLeftButton();
   generator.MoveMouseBy(10, 5);
@@ -1033,7 +1034,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromTop) {
   EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
 
   // Do an edge swipe top into screen.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   generator.GestureScrollSequence(gfx::Point(50, 0),
                                   gfx::Point(50, 100),
                                   base::TimeDelta::FromMilliseconds(20),
@@ -1077,7 +1078,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromBottom) {
   EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
 
   // Do an edge swipe bottom into screen.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   int y = Shell::GetPrimaryRootWindow()->bounds().bottom();
   generator.GestureScrollSequence(gfx::Point(50, y),
                                   gfx::Point(50, y - 100),
@@ -1113,7 +1114,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeTouchAtTop) {
   EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
 
   // Touch tap on the top edge.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   generator.GestureTapAt(gfx::Point(100, 0));
   EXPECT_FALSE(foreground_window_state->IsFullscreen());
   EXPECT_TRUE(background_window_state->IsFullscreen());
@@ -1149,7 +1150,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeTouchAtBottom) {
   EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
 
   // Touch tap on the bottom edge.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   generator.GestureTapAt(
       gfx::Point(100, Shell::GetPrimaryRootWindow()->bounds().bottom() - 1));
   EXPECT_FALSE(foreground_window_state->IsFullscreen());
@@ -1183,7 +1184,7 @@ TEST_F(MaximizeModeWindowManagerTest, NoExitImmersiveModeWithEdgeSwipeFromTop) {
   window_state->set_in_immersive_fullscreen(true);
 
   // Do an edge swipe top into screen.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   generator.GestureScrollSequence(gfx::Point(50, 0),
                                   gfx::Point(50, 100),
                                   base::TimeDelta::FromMilliseconds(20),
@@ -1215,7 +1216,7 @@ TEST_F(MaximizeModeWindowManagerTest,
   EXPECT_TRUE(window_state->in_immersive_fullscreen());
 
   // Do an edge swipe bottom into screen.
-  aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+  ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
   int y = Shell::GetPrimaryRootWindow()->bounds().bottom();
   generator.GestureScrollSequence(gfx::Point(50, y),
                                   gfx::Point(50, y - 100),