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

Unified Diff: ash/wm/window_manager_unittest.cc

Issue 82463002: Invoke cursor-hiding logic on touch for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed ifdef Created 7 years 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 | « no previous file | ui/views/corewm/compound_event_filter.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 2b97e5259e06573a07dc92bac4eeb0bd963f6c72..af216131c46322b7d474da352b46949f137a30cf 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -704,10 +704,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
env_filter->RemoveHandler(f2.get());
}
-// A keypress and/or touch only hides the cursor on ChromeOS (crbug.com/304296).
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_WIN)
// We should show and hide the cursor in response to mouse and touch events as
-// requested.
+// requested. ChromeOS and Windows are the only platforms which hide the cursor
+// in response to touch (crbug.com/322250).
TEST_F(WindowManagerTest, UpdateCursorVisibility) {
aura::test::EventGenerator& generator = GetEventGenerator();
views::corewm::CursorManager* cursor_manager =
@@ -726,7 +726,11 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
EXPECT_TRUE(cursor_manager->IsCursorVisible());
EXPECT_TRUE(cursor_manager->IsMouseEventsEnabled());
}
+#endif // defined(OS_CHROMEOS) || defined(OS_WIN)
+#if defined(OS_CHROMEOS)
+// ChromeOS is the only platform for which the cursor is hidden on both
+// touch and keypress (crbug.com/304296).
TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
aura::test::EventGenerator& generator = GetEventGenerator();
views::corewm::CursorManager* cursor_manager =
@@ -810,6 +814,6 @@ TEST_F(WindowManagerTest, TestCursorClientObserver) {
EXPECT_FALSE(observer_b.did_visibility_change());
EXPECT_TRUE(observer_a.is_cursor_visible());
}
-#endif
+#endif // defined(OS_CHROMEOS)
} // namespace ash
« no previous file with comments | « no previous file | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698