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
HTML: tests for <input type=checkbox switch> #42449
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a computedrole subtest in /html-aam/roles.html
43e795f
to
0f61c29
Compare
html/semantics/selectors/pseudo-classes/indeterminate-switch.indeterminate.window.js
Outdated
Show resolved
Hide resolved
For whatwg/html#9546. Co-authored-by: lilyspiniolas <119537181+lilyspiniolas@users.noreply.github.com>
0f61c29
to
4b7d036
Compare
assert_true(body.matches(":has(:indeterminate)")); | ||
|
||
input.switch = true; | ||
assert_false(body.matches(":has(:indeterminate)")); | ||
}, "Parent of a checkbox that becomes a switch control does not match :has(:indeterminate)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing style invalidation (not just matching) in a separate commit like css/selectors/invalidation/input-pseudo-classes-in-has.html would be valuable. Having the styling stay stale is a common issue with :has()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css/selectors/invalidation/media-pseudo-classes-in-has.html is another good example to go off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would have been nice to know an hour ago. I think this can be a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed the AX tests, but the HTML ones look fine
https://bugs.webkit.org/show_bug.cgi?id=264129 rdar://117885150 Reviewed by Tim Nguyen. This hopefully ensures that the logic added to HTMLInputElement does not regress. The added tests are upstreamed via web-platform-tests/wpt#42449. They are .tentative for now as standardization is still ongoing. * LayoutTests/imported/w3c/web-platform-tests/html-aam/roles-dynamic-switch.tentative.window-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html-aam/roles-dynamic-switch.tentative.window.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html-aam/roles-dynamic-switch.tentative.window.js: Added. (promise_test.async t): * LayoutTests/imported/w3c/web-platform-tests/html-aam/roles.tentative-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html-aam/roles.tentative.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch-indeterminate-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch-indeterminate.tentative-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch-indeterminate.tentative.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch-notref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative-expected-mismatch.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/input-checkbox-switch.tentative.window-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/input-checkbox-switch.tentative.window.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/input-checkbox-switch.tentative.window.js: Added. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/270176@main
For whatwg/html#9546.