Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPT click or clickAndWait commands are synthetic and do not dispatch trusted events. #3048

Open
MaryamHuntsperger opened this issue Mar 6, 2024 · 2 comments
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest

Comments

@MaryamHuntsperger
Copy link

MaryamHuntsperger commented Mar 6, 2024

Description

WPT action APIs are synthetic and do not dispatch trusted events. This means that events triggered by click or clickAndWait will be ignored by the EventTiming APIs

Steps to reproduce

Create an event handler that listens to click event and logs "isTrusted" property of the event with a command like:
execAndWait document.body.addEventListener("click", function(e){console.warn('isTrusted is ', e.isTrusted)}, {passive: true, capture: true})
Then run a clickAndWait command like:
clickAndWait id=<>

This will log onto the console that "isTrusted is false"

Expected result

We want that click event's isTrusted property to be true.

@jspurlin
Copy link

jspurlin commented Mar 6, 2024

FYI @slightlyoff. Currently the EventTiming API ignores events where isTrusted is false which means we can't utilize the signals from that API in WPT. I believe MSFT's internal WPT usage is interested in picking this up soon

@jspurlin
Copy link

jspurlin commented Mar 8, 2024

@MaryamHuntsperger It'd be interesting to generalize this item to include also being able to dispatch other trusted events (like touch and keyboard events)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug An issue or pull request relating to a bug in WebPageTest
Projects
None yet
Development

No branches or pull requests

2 participants