Disable system input events during testing |
|||||||
Issue descriptionA 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.
,
Sep 13
+wjmaclean as he recently ran into this in a content test.
,
Sep 13
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.
,
Dec 10
/cc input-dev@ folks
,
Dec 10
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.
,
Dec 10
Xiyuan did some refactoring of this code.
,
Dec 14
,
Dec 14
,
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 |
|||||||
Comment 1 by sky@chromium.org
, Sep 13