#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 {
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.
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);
// 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);
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),
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),
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());
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());
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),
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),