Mouse cursor warped to top left corner when running content_shell with --run-web-tests |
|||
Issue descriptionchrishtr pointed out [1] that the mouse pointer is moved to the top left corner of the screen when running content_shell with --run-web-tests . This was introduced by https://chromium-review.googlesource.com/1022959 [1] https://dynamite-preprod.sandbox.google.com/room/AAAA1A4Nw9Y/hZGe4w_65uI?referrer=1 (sorry, Google-internal)
,
May 31 2018
Yeah, that was intentional. There are some tests that look at the hover state, for example, and they get messed up if the mouse is over the web content. Ideally we would make those tests not be flaky like that, but for now this gets rid of that interference.
,
May 31 2018
In the case of run-web-tests, though, no window is even displayed, so I don't understand how the mouse could be over anything at all.
,
May 31 2018
I agree that it's weird, but that's what I saw happening. I'm guessing something is querying the cursor position directly rather than listening for events.
,
May 31 2018
Were you trying to fix something Windows-specific, by any chance? Maybe you could enable the fix for Windows only, if that's the case? I'm on Linux, FWIW.
,
May 31 2018
It was a Linux failure, actually ( bug 828591 if you're interested). I managed to reproduce it locally too, unsure why it didn't show up on the Windows bots at the time. Now that I remember the context, it shows up even when the window isn't displayed because it's not a real mouse event that's causing the problem. When the window is activated, Chrome synthesizes a mouse move event to resync all the UI elements that might have gotten out of sync while it was deactivated. The bug I fixed was that it was sometimes using a stale mouse location. Updating it with the real mouse location revealed that the tests were relying on the stale location to give a consistent beginning state. At the layer where all these problems are happening we have no idea whether we're in a real browser or a headless content_shell so we can't create a test mode. And the web content needs to react to synthesized events, otherwise the rest of the test won't work at all. So I'm not sure what else we would do.
,
Jun 1 2018
Thanks for explaining. So, ideally, we should rather fix the tests, I suppose. I.e. the tests that need to should move the cursor to a suitable location before carrying on with the actual test.
,
Jun 1 2018
I can consistently repro this with running content_unittests
,
Nov 19
Mass UI Triage. |
|||
►
Sign in to add a comment |
|||
Comment 1 by futhark@chromium.org
, May 31 2018