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

Issue 711340 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: 14
NextAction: 2017-04-28
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Add a presubmit script to check if eventSender still be used for new layout tests

Project Member Reported by lanwei@chromium.org, Apr 13 2017

Issue description

In order to encourage new layout tests to use chrome.gpuBenchmarking.pointerActionSequence instead of eventSender, we add a presubmit script to check if eventSender is still used in the new layout tests. This also helps us to slowly replace eventSender in the current layout tests.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 20 2017

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

commit a15a2d8062d9919bef96f18455a062a920f4568a
Author: lanwei <lanwei@chromium.org>
Date: Thu Apr 20 14:20:47 2017

Add a presubmit script to check if eventSender still be used for new layout tests.

In order to encourage new layout tests to use chrome.gpuBenchmarking.pointerActionSequence
instead of eventSender, we add a presubmit script to check if eventSender is still used in the new layout tests.
This also helps us to slowly replace eventSender in the current layout tests.

BUG= 711340 

Review-Url: https://codereview.chromium.org/2810943005
Cr-Commit-Position: refs/heads/master@{#466001}

[modify] https://crrev.com/a15a2d8062d9919bef96f18455a062a920f4568a/third_party/WebKit/LayoutTests/PRESUBMIT.py

Comment 2 by lanwei@chromium.org, Apr 20 2017

Status: Fixed (was: Started)
Would it make sense to reactivate this bug to tweak the error message being reported by the presubmit checks?  It would be great if the message would provide a bug number of a blink-dev link that provides more details about the deprecation of eventSender:
- Is it deprecated altogether or only in specific scenarios?
- Why is eventSender deprecated / what is the problem with eventSender?
- What do we plan to do with the existing, legacy uses of eventSender?
Status: Available (was: Fixed)
#3 makes sense to me.

Lan, do we have a doc on this you can link?

Comment 5 by lanwei@chromium.org, Apr 27 2017

Yes, I am preparing a short doc and patch to add to the error message, so anyone can take it as a reference for the pointerActionSequence API.

Comment 6 by msten...@opera.com, Apr 28 2017

Cc: msten...@opera.com
(CCing myself, so that I'll hopefully learn WHY eventSender is bad)
TL;DR; events sent using eventSender go through a small amount of the input pipeline, and events sent through the pointerActionSequence API go through the vast majority of the input pipeline.

This matters most for touch input, as eventSender requires you to manually dispatch touch input and gesture input, whereas pointerActionSequence runs the synthesized touch input through our gesture detector. It's still a nice win for code coverage for other input types though.
Project Member

Comment 8 by bugdroid1@chromium.org, May 1 2017

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

commit 3e1724e5ccd3d41d417d13487c4b1376a6815a93
Author: lanwei <lanwei@chromium.org>
Date: Mon May 01 16:24:11 2017

Add a doc in the presubmit script checking if layout tests use eventSender

In https://codereview.chromium.org/2810943005/, we added a presubmit script
to check if eventSender is still used in new layout tests. Here, We add a
doc to explain why we want to replace EventSender and give some examples
on how to use this new API in testing.

BUG= 711340 

Review-Url: https://codereview.chromium.org/2844803005
Cr-Commit-Position: refs/heads/master@{#468323}

[modify] https://crrev.com/3e1724e5ccd3d41d417d13487c4b1376a6815a93/third_party/WebKit/LayoutTests/PRESUBMIT.py

I added a doc to explaining why we deprecate eventSender, and start using PointerActionSequence, and our plan of replacing eventSender.   
https://docs.google.com/document/d/144014DG9qVx1AnJ5MU-pFXlEsd6jOhk39bFfRTLo0Mg/.

I will leave this issue open to collect the cases that PointerActionSequence cannot achieve in layout tests, so we can keep improving it.
Using named "gpuBenchmarking" to simulate user input in test sounds hacky and confusing.
How about to introduce eventSender.PointerActionSequence() or so?
Cc: nzolghadr@chromium.org
Yeah, we're going to need to overhaul this at some point. We've been hoping to move from the gpu benchmarking extension directly to something standardized, but it might make sense to temporarily add a hook into this on EventSender.

Navid, any thoughts?
Yeah. We are looking into adding the input injection API to web platform tests this quarter. After we get that done we can start using that naming/API.
Status: Fixed (was: Available)
is there a way to pass key modifiers (alt/meta/ctrl) with events?
We are working on adding the current set of APIs (i.e. pointer action APIs) under test driver API in WPT. But this first set is not going to have keyboard events.
Lan, do we have another bug for adding support for gpu benchmarking? I don't seem to find anything. Would you be able to create a bug for that?

Sign in to add a comment