SendMouseMove and variants don't actually move mouse on x11 |
||||||
Issue descriptionThey directly send X events, which does not result in actually moving the mouse. This is problematic as if code queries for the mouse position (GetCursorScreenPoint()) it gets the wrong thing. I see two options: 1. Use XWarpPointer, which generates the events. 2. Install a test screen implementation that overrides GetCursorScreenPoint. 1 sounds ideal, I'm not sure why we didn't do this in the first place though. A bunch of tab dragging tests fail because of this.
,
Aug 24 2016
,
Aug 24 2016
+marcheu@ GetCursorScreenPoint should be using the last mouse position, which should be updated by these events. IIRC, the implementation has changed from XQueryPointer because it's synchronous call to X11, which is slow and can cause dead lock (I don't remember if we actually had dead lock though).
,
Aug 24 2016
,
Aug 24 2016
DesktopScreenX11::GetCursorScreenPoint() uses XQueryPointer and has for at least the past 4 years.
,
Aug 24 2016
Even longer than 4 years since ScreenGtk::GetCursorScreenPoint() used to call gtk_display_get_cursor() which called XQueryPointer().
,
Aug 24 2016
Ok it could have been done only for chromeos (linux views). It was pre aura, so it was more than 5 years ago. If you switch to XWarpPointer, one thing you may have to do is to keep windows used in the test within the display (X root window). I had a problem with multi display tests in the past, which uses XWarpPointer to move the cursor to another WTH but it failed because it was trying to move the cursor to outside of the root window. It's probably not an issue in most of desktop tests, but just in case.
,
Aug 24 2016
One thing to note is if we use XWarpPointer, we may get additional mouse-move etc. events from the server, which may or may not break some tests, maybe.
,
Aug 24 2016
sky@ Which tab dragging tests are affected?
,
Aug 24 2016
There is a bunch. https://codereview.chromium.org/2277923002/ turns on one test. It's only chromeos and windows at this time as the linux non-chromeos is broke because of this bug.
,
Aug 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/49530a1b55b7b3b6d1210d2dfdb6d8b075a1116d commit 49530a1b55b7b3b6d1210d2dfdb6d8b075a1116d Author: sky <sky@chromium.org> Date: Wed Aug 24 23:37:46 2016 Attempt 2 at enabling a tab dragging test This was reverted because of flake on linux. I've identified why the flake was happening and filed a bug, so I'm leaving the enabling as only chromeos and windows at this time. These tests were disabled because the resize lock can trigger at random points, blocking event delivery and breaking the tests. I've added a switch to disable the resize lock so that events now have known delivery order. BUG= 331924 , 640741 TEST=none R=oshima@chromium.org Review-Url: https://codereview.chromium.org/2277923002 Cr-Commit-Position: refs/heads/master@{#414198} [modify] https://crrev.com/49530a1b55b7b3b6d1210d2dfdb6d8b075a1116d/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc [modify] https://crrev.com/49530a1b55b7b3b6d1210d2dfdb6d8b075a1116d/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4dcd8ad19534e6084fff6bc2229acd90ecf4c316 commit 4dcd8ad19534e6084fff6bc2229acd90ecf4c316 Author: thomasanderson <thomasanderson@google.com> Date: Mon Sep 12 18:30:56 2016 X11: Add TestDesktopScreenX11 to simulate mouse movement in ui tests BUG= 640741 Review-Url: https://codereview.chromium.org/2327623002 Cr-Commit-Position: refs/heads/master@{#417978} [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/chrome/test/base/in_process_browser_test.cc [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/chrome/test/base/view_event_test_platform_part_default.cc [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/ui/views/BUILD.gn [add] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/ui/views/test/test_desktop_screen_x11.cc [add] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/ui/views/test/test_desktop_screen_x11.h [modify] https://crrev.com/4dcd8ad19534e6084fff6bc2229acd90ecf4c316/ui/views/test/ui_controls_factory_desktop_aurax11.cc
,
Sep 12 2016
,
Jan 24 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sky@chromium.org
, Aug 24 2016