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

Unified Diff: ash/wm/window_manager_unittest.cc

Issue 406413004: Cleanups for aura/test/event_generator.h (resolve TODOs) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase at r285842 Created 6 years, 5 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/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/window_modality_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_manager_unittest.cc
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 75b7e4e9b80f2ffabf4151bc12e50ef3062f9c8d..c47c8e274b37b28b70a117aa18d327c2231d3ed0 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -12,7 +12,6 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_base.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/base/cursor/cursor.h"
@@ -20,6 +19,7 @@
#include "ui/events/event.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/compound_event_filter.h"
@@ -174,8 +174,7 @@ TEST_F(WindowManagerTest, Focus) {
SK_ColorGRAY, -13, gfx::Rect(5, 470, 50, 50), w1.get()));
// Click on a sub-window (w121) to focus it.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w121.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w121.get());
generator.ClickLeftButton();
aura::client::FocusClient* focus_client =
@@ -287,8 +286,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click on window2.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
generator.ClickLeftButton();
// Window2 should have become active.
@@ -304,8 +302,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click back on window1, but set it up so w1 doesn't activate on click.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w1.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w1.get());
d1.set_activate(false);
generator.ClickLeftButton();
@@ -335,8 +332,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
&wd, -11, gfx::Rect(10, 10, 10, 10), w1.get()));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w11.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w11.get());
// First set the focus to the child |w11|.
generator.ClickLeftButton();
EXPECT_EQ(w11.get(), focus_client->GetFocusedWindow());
@@ -361,8 +358,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
// Move focus to |w2| first.
scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
&wd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
generator.ClickLeftButton();
EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
EXPECT_FALSE(w11->CanFocus());
@@ -403,8 +399,8 @@ TEST_F(WindowManagerTest, PanelActivation) {
NonFocusableDelegate nfd;
scoped_ptr<aura::Window> w3(CreateTestWindowInShellWithDelegate(
&nfd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
- w3.get());
+ ui::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
+ w3.get());
wm::ActivateWindow(p1.get());
EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
generator3.ClickLeftButton();
@@ -731,7 +727,7 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
#if defined(OS_CHROMEOS) || defined(OS_WIN)
// Touch visually hides the cursor on ChromeOS and Windows
TEST_F(WindowManagerTest, UpdateCursorVisibility) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -754,7 +750,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
// ChromeOS is the only platform for which the cursor is hidden on keypress
// (crbug.com/304296).
TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -777,7 +773,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
}
TEST_F(WindowManagerTest, TestCursorClientObserver) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/window_modality_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698