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 a test for :autofill. #27098

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Jan 8, 2021

There's no way to trigger autofilling from WPT so this is as much as we
can test.

@annevk
Copy link
Member

annevk commented Jan 8, 2021

I think we can also test how -webkit-autofill shows up in selectorText.

@emilio
Copy link
Contributor Author

emilio commented Jan 8, 2021

I think we can also test how -webkit-autofill shows up in selectorText.

Sure, though I made :-webkit-autofill not normative intentionally...

@emilio
Copy link
Contributor Author

emilio commented Jan 8, 2021

I added a test for :-webkit-autofill following the discussion in the HTML PR. I didn't test the specific serialization because we have no precedent (which I know of) in the selectors spec about how aliases are serialized. E.g.:

As previous drafts of this specification used the name :matches() for this pseudo-class, UAs may additionally implement this obsolete name as an alias for :is() if needed for backwards-compatibility.

(without details on how that works).

I also expect it to matter little to nothing wrt compat. We implement most other -webkit-/moz things as parse-time changes into the standard thing, though at least in WebKit there's precedent for preserving the serialization of some legacy things (like ::-webkit-input-placeholder).

@domenic
Copy link
Member

domenic commented Jan 8, 2021

I do think we should figure out the serialization of such aliases, and get it specced somewhere and tested, but I can understand if that's a low priority for the CSSWG and various browsers. (And it doesn't block adding these to HTML, IMO.)

We may also want to file a bug (on this repo) about making autofill more testable, just so the WPT team has a good insight into what untestable things are out there.

@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2021

I do think we should figure out the serialization of such aliases, and get it specced somewhere and tested, but I can understand if that's a low priority for the CSSWG and various browsers. (And it doesn't block adding these to HTML, IMO.)

Filed w3c/csswg-drafts#5847.

We may also want to file a bug (on this repo) about making autofill more testable, just so the WPT team has a good insight into what untestable things are out there.

#27118

@Loirooriol
Copy link
Contributor

What about testing the serialization but allowing both possibilities (for now)?

test_valid_selector(":autofill");
test_valid_selector(":-webkit-autofill", [":-webkit-autofill", ":autofill"]);

There's no way to trigger autofilling from WPT so this is as much as we
can test.
@emilio
Copy link
Contributor Author

emilio commented Jan 11, 2021

What about testing the serialization but allowing both possibilities (for now)?

test_valid_selector(":autofill");
test_valid_selector(":-webkit-autofill", [":-webkit-autofill", ":autofill"]);

Sure, sounds great, done :)

@emilio emilio merged commit 6e30c0e into web-platform-tests:master Jan 11, 2021
@emilio emilio deleted the html/6181 branch January 11, 2021 19:27
@emilio
Copy link
Contributor Author

emilio commented Jan 11, 2021

I added the CSSWG issue to the agenda, and will edit the test as needed once there's a resolution on that.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2021
Spec PR at whatwg/html#6273
Tests at web-platform-tests/wpt#27098

Differential Revision: https://phabricator.services.mozilla.com/D101148

UltraBlame original commit: 28268df8154dad7a2e686ff95ad5559a46316cbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants