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

Add consume user activation of Window #1695

Closed

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Nov 15, 2022

Closes #1691

Related discussion web-platform-tests/wpt#36727

RFC for Web Platform Tests: web-platform-tests/rfcs#128

Implementation in testdriver.js: web-platform-tests/wpt#37176


Preview | Diff

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from a HTML editor perspective, setting aside for now #1696. Not sure what the procedure is around here for when something is mergeable (implementer interest etc.).

@marcoscaceres
Copy link
Member Author

Implemented it WebKit for internal tests (not Safari Driver):
WebKit/WebKit#6539

I'm pretty happy with it! The tests are super nice now. No more window.open() or requestFullscreen() business!!!! 🥳🎉

@marcoscaceres
Copy link
Member Author

marcoscaceres commented Nov 17, 2022

A requirement to getting this merged appears to be having WPT tests. However, I had a look at the existing tests and they are unfortunately written in Python (I have zero Python knowledge... so little knowledge, in fact, that I don't know if it's "python" or "Python"). I can try to copy/paste my way to success, but could use some help with those.

@jgraham
Copy link
Member

jgraham commented Nov 18, 2022

It would also be good to understand if this is something that has implementor interest to actually ship to web devs in WebDriver. If not it should perhaps be in the testutils spec instead.

@marcoscaceres
Copy link
Member Author

marcoscaceres commented Nov 18, 2022

This seems to be pretty important to web developers too, as user activation can expire if things they are doing, fetch()’ing, or processing take too long. This gives them an opportunity to test for such cases and come up with strategies for recovery.

@foolip
Copy link
Member

foolip commented Nov 25, 2022

I think this makes sense. @vladimir-nechaev @sadym-chromium do you think this makes sense for chromedriver? If we file a chromedriver bug and merge this spec PR, is it something you'd be able to implement easily, or does it seem involved?

@marcoscaceres
Copy link
Member Author

Sent web-platform-tests/wpt#37176 for testdriver.js

@jgraham
Copy link
Member

jgraham commented Dec 6, 2022

With apologies for creating work here: I think we should move this proposal into the HTML spec rather than in the base WebDriver spec. There are a few reasons for that:

  • The base WebDriver spec is mostly in maintainance mode, and there isn't a clear bar for adding new features.
  • This feature is deeply integrated with HTML (it's more or less providing authors with a way to set some internal state). Generally for this kind of feature the precedent is to put the automation endpoint in the spec it relates to rather than directly in WebDriver (e.g. Custom handlers automation whatwg/html#8267, or the endpoints in the Permissions spec).
  • Making the PR in HTML will make it clear that it should be evaluated according to the WHATWG standards for new features, and get more of the right people to review (if there is general feedback that the feature is OK, it's easier to get automation people to look at the API in the external standard than vice-versa).

Sorry for not suggesting this right away; I didn't immediately think of it, but once the idea came up it seemed like very much the best option.

@javifernandez
Copy link

FWIW, I believe there is another example in the Secure Payment Confirmation spec of how to define a new WebDriver extension command; see the RFC for details.

@marcoscaceres
Copy link
Member Author

Thanks @jgraham, @javifernandez, I'll move it to HTML instead.

@marcoscaceres
Copy link
Member Author

HTML PR is at whatwg/html#8609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a means to consume user activation
5 participants