New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640741 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

SendMouseMove and variants don't actually move mouse on x11

Project Member Reported by sky@chromium.org, Aug 24 2016

Issue description

They 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.
 

Comment 1 by sky@chromium.org, Aug 24 2016

Specifically UIControlsDesktopX11 is the place I'm referring to.

Comment 2 by sky@chromium.org, Aug 24 2016

Cc: -bsep@chromium.org thomasanderson@chromium.org

Comment 3 by osh...@chromium.org, 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).

Comment 4 by osh...@chromium.org, Aug 24 2016

Cc: marc...@chromium.org

Comment 5 by sky@chromium.org, Aug 24 2016

Cc: e...@chromium.org
DesktopScreenX11::GetCursorScreenPoint() uses XQueryPointer and has for at least the past 4 years.

Comment 6 by e...@chromium.org, Aug 24 2016

Even longer than 4 years since ScreenGtk::GetCursorScreenPoint() used to call gtk_display_get_cursor() which called XQueryPointer().

Comment 7 by osh...@chromium.org, 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.

Comment 8 by sadrul@chromium.org, 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.
sky@ Which tab dragging tests are affected?

Comment 10 by sky@chromium.org, 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.
Project Member

Comment 11 by bugdroid1@chromium.org, 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

Status: Fixed (was: Untriaged)
Components: Tests>Disabled
Labels: Test-Disabled

Sign in to add a comment