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

HTML: tests for <input type=checkbox switch> #42449

Merged
merged 4 commits into from Nov 3, 2023
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Oct 10, 2023

Copy link
Contributor

@cookiecrook cookiecrook left a 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

html-aam/roles.html Outdated Show resolved Hide resolved
For whatwg/html#9546.

Co-authored-by: lilyspiniolas <119537181+lilyspiniolas@users.noreply.github.com>
Comment on lines 42 to 46
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)");
Copy link
Member

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()

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@nt1m nt1m left a 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

@annevk annevk merged commit 3a893e3 into master Nov 3, 2023
20 checks passed
@annevk annevk deleted the annevk/switch-control branch November 3, 2023 15:17
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request Nov 3, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants