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

Issue 883710 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Disable system input events during testing

Project Member Reported by sadrul@chromium.org, Sep 13

Issue description

A bunch of tests synthesize input events during testing, and this ranges from unit-tests, interactive-ui-tests, telemetry tests etc. During such tests, it is possible that chrome also receives unexpected input events from the native system (e.g. if the window happens to show up under the mouse cursor), causing unexpected failures (e.g. the event-stream becomes invalid, or the tooltip shows up, etc.). Ignoring all input events from the system during these tests should make these tests more deterministic.
 
I wonder if we could do this with for all platforms via a pre-target handler. The handler would be attached to Env and consume all events that have a native event.
Cc: wjmaclean@chromium.org
+wjmaclean as he recently ran into this in a content test.
I landed a temporary work-around in

https://chromium-review.googlesource.com/c/chromium/src/+/1194253

which seems to have been effective in fixing a flake related to exactly the issue where a window pops up under the mouse cursor.

But something at a higher level, and that comprehensively blocks all system input events, would be very welcome.
Cc: bokan@chromium.org nzolghadr@chromium.org
/cc input-dev@ folks
Status: Assigned (was: Available)
James' workaround doesn't seem to be in that file anymore. But I have a local patch to add a content switch for this to ignore os input. I'm going to send it soon after https://chromium-review.googlesource.com/c/chromium/src/+/1365085
lands.
Cc: xiy...@chromium.org
Xiyuan did some refactoring of this code.
Owner: nzolghadr@chromium.org
Components: Blink>Input
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a60b6a5add634cf45ee443f226a04e99b0f6af42

commit a60b6a5add634cf45ee443f226a04e99b0f6af42
Author: Navid Zolghadr <nzolghadr@chromium.org>
Date: Mon Jan 07 18:09:25 2019

Add content flag to ignore os input events

This helps tests to run only responding
to the synthetic inputs without os input
events interfering with the flow.

This first CL just ignores synthetic mouse
events on Aura platforms which conveys
mouse location to the newly openned windows.

Bug: 883710
Change-Id: I629c20ed3755462b45bf4a5b1ecc4075c3cba282
Reviewed-on: https://chromium-review.googlesource.com/c/1377727
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620377}
[modify] https://crrev.com/a60b6a5add634cf45ee443f226a04e99b0f6af42/content/browser/site_per_process_hit_test_browsertest.cc
[modify] https://crrev.com/a60b6a5add634cf45ee443f226a04e99b0f6af42/ui/aura/window_event_dispatcher.cc
[modify] https://crrev.com/a60b6a5add634cf45ee443f226a04e99b0f6af42/ui/events/platform/platform_event_source.cc
[modify] https://crrev.com/a60b6a5add634cf45ee443f226a04e99b0f6af42/ui/events/platform/platform_event_source.h

Sign in to add a comment