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

Unified Diff: ui/aura/window_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: fix gn 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
Index: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 37cf5edca783169da05c17d47ac628f9059ab54a..53b90775a4940cac890459477230b48be369f10f 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -20,7 +20,6 @@
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/aura_test_utils.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/test/window_test_api.h"
@@ -39,6 +38,7 @@
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_configuration.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/skia_util.h"
@@ -781,7 +781,7 @@ TEST_F(WindowTest, CaptureTests) {
EXPECT_TRUE(window->HasCapture());
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
- EventGenerator generator(root_window(), gfx::Point(50, 50));
+ ui::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
generator.PressLeftButton();
EXPECT_EQ(1, delegate.mouse_event_count());
generator.ReleaseLeftButton();
@@ -1033,7 +1033,7 @@ TEST_F(WindowTest, ChangeCaptureWhileMouseDown) {
EXPECT_TRUE(window->HasCapture());
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
- EventGenerator generator(root_window(), gfx::Point(50, 50));
+ ui::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
generator.PressLeftButton();
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
@@ -1136,7 +1136,7 @@ TEST_F(WindowTest, MouseEnterExit) {
CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(70, 70, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1157,7 +1157,7 @@ TEST_F(WindowTest, WindowTreeHostExit) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1183,7 +1183,7 @@ TEST_F(WindowTest, MouseEnterExitWithClick) {
CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(70, 70, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1209,7 +1209,7 @@ TEST_F(WindowTest, MouseEnterExitWhenDeleteWithCapture) {
CreateTestWindowWithDelegate(&delegate, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(window.get());
EXPECT_TRUE(delegate.entered());
EXPECT_FALSE(delegate.exited());
@@ -1237,7 +1237,7 @@ TEST_F(WindowTest, MouseEnterExitWithDelete) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1271,7 +1271,7 @@ TEST_F(WindowTest, MouseEnterExitWithHide) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1303,7 +1303,7 @@ TEST_F(WindowTest, MouseEnterExitWithParentHide) {
MouseEnterExitWindowDelegate d2;
Window* w2 = CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(10, 10, 50, 50),
w1.get());
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w2);
// Enters / exits can be send asynchronously.
RunAllPendingInMessageLoop();
@@ -1327,7 +1327,7 @@ TEST_F(WindowTest, MouseEnterExitWithParentDelete) {
MouseEnterExitWindowDelegate d2;
Window* w2 = CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(10, 10, 50, 50),
w1.get());
- test::EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w2);
// Enters / exits can be send asynchronously.
@@ -2018,7 +2018,7 @@ TEST_F(WindowTest, VisibilityClientIsVisible) {
TEST_F(WindowTest, MouseEventsOnWindowChange) {
gfx::Size size = host()->GetBounds().size();
- EventGenerator generator(root_window());
+ ui::test::EventGenerator generator(root_window());
generator.MoveMouseTo(50, 50);
EventCountDelegate d1;

Powered by Google App Engine
This is Rietveld 408576698