diff options
author | tdanderson@google.com <tdanderson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-16 19:44:01 +0000 |
---|---|---|
committer | tdanderson@google.com <tdanderson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-16 19:44:01 +0000 |
commit | 2fe2c58fc3abbe2a556dc4824e094d71c567adf5 (patch) | |
tree | 83d34785a905a9b23692b3804a3ed9c34ec3e484 /ash/wm/window_manager_unittest.cc | |
parent | c05a6d22e32698902910edae7561b94bb4886d23 (diff) | |
download | chromium_src-2fe2c58fc3abbe2a556dc4824e094d71c567adf5.zip chromium_src-2fe2c58fc3abbe2a556dc4824e094d71c567adf5.tar.gz chromium_src-2fe2c58fc3abbe2a556dc4824e094d71c567adf5.tar.bz2 |
Invoke cursor-hiding logic on touch for Windows
Continue to invoke cursor-hiding logic on touch
for Windows even though the OS hides the cursor
for us. The reason is that this code path is
needed in order to call
RenderWidgetHostViewAura::
NotifyRendererOfCursorVisibilityState()
in order for the renderer to know to suppress
generation of synthetic mousemove events
while touch scrolling. This avoids unwanted
hover effects from being invoked when the
cursor is not visible.
To avoid regressions in behavior (such as
the one mentioned in
https://codereview.chromium.org/56053004),
make the cursor state global among all
root windows. This is done in
https://codereview.chromium.org/111043002/.
BUG=322250
TEST=To be added later (crbug.com/328549)
R=sky@chromium.org
Review URL: https://codereview.chromium.org/82463002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_manager_unittest.cc')
-rw-r--r-- | ash/wm/window_manager_unittest.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 2b97e52..af21613 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 |