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

Unified Diff: ash/wm/window_manager_unittest.cc

Issue 11035050: Enable CursorManager::LockCursor to lock cursor visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: ash/wm/window_manager_unittest.cc
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index b99bbb841bd58effd0fd5f40d0d4f4d425ea3843..b7ceac174e17dea01b8ca03e7962b825d0258697 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -598,6 +598,10 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), 0, getTime());
ui::TouchEvent touch_pressed2(
ui::ET_TOUCH_PRESSED, gfx::Point(0, 0), 1, getTime());
+ ui::TouchEvent touch_released1(
+ ui::ET_TOUCH_RELEASED, gfx::Point(0, 0), 0, getTime());
+ ui::TouchEvent touch_released2(
+ ui::ET_TOUCH_RELEASED, gfx::Point(0, 0), 1, getTime());
root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
EXPECT_TRUE(cursor_manager->cursor_visible());
@@ -605,6 +609,8 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
EXPECT_FALSE(cursor_manager->cursor_visible());
root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
EXPECT_TRUE(cursor_manager->cursor_visible());
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released1);
+ EXPECT_TRUE(cursor_manager->cursor_visible());
// If someone else made cursor invisible keep it invisible even after it
// received mouse events.
@@ -615,6 +621,8 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
EXPECT_FALSE(cursor_manager->cursor_visible());
root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
EXPECT_FALSE(cursor_manager->cursor_visible());
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2);
+ EXPECT_FALSE(cursor_manager->cursor_visible());
// Back to normal.
cursor_manager->ShowCursor(true);
@@ -624,6 +632,8 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
EXPECT_FALSE(cursor_manager->cursor_visible());
root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved);
EXPECT_TRUE(cursor_manager->cursor_visible());
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_released2);
+ EXPECT_TRUE(cursor_manager->cursor_visible());
}
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698