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 tests for 'class' and 'for' aliases for 'className' and 'htmlFor' #48220

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Psychpsyo
Copy link
Contributor

This adds new tests that test for the behavior proposed in issue #9379 on the HTML spec and issue #1310 on the DOM spec.

Some other tests have also been updated and expanded to include the new behavior.
(Notably, acid3 was testing for the exact opposite, this has been inverted)

@Psychpsyo Psychpsyo marked this pull request as draft September 17, 2024 11:35
@Psychpsyo Psychpsyo marked this pull request as ready for review September 17, 2024 17:53
Copy link
Contributor

@schenney-chromium schenney-chromium left a comment

Choose a reason for hiding this comment

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

Looks good to me but I think a second opinion is needed just because I'm not experienced to know that we merge tests before the work has been done to verify that the change is not going to break the web.

For subsequent reviewers, the changes are good apart from the one issue I flagged. So deep second review is not necessary (I feel).

acid/acid3/test.html Show resolved Hide resolved
@Psychpsyo
Copy link
Contributor Author

Looks good to me but I think a second opinion is needed just because I'm not experienced to know that we merge tests before the work has been done to verify that the change is not going to break the web.

I think they'd need to be marked as tentative for that, which is impossible for the modified tests so I also think this should only get merged after the spec changes, which should only get merged after we know if this is actually web compatible.

@schenney-chromium
Copy link
Contributor

Looks good to me but I think a second opinion is needed just because I'm not experienced to know that we merge tests before the work has been done to verify that the change is not going to break the web.

I think they'd need to be marked as tentative for that, which is impossible for the modified tests so I also think this should only get merged after the spec changes, which should only get merged after we know if this is actually web compatible.

Delaying landing this seems good. In that case I'll approve the PR.


<script>
test(function() {
assert_true(testDiv.class == "", "class must reflect \"class\"");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use assert_equals

@@ -356,7 +356,8 @@ interface Element : Node {
readonly attribute DOMString tagName;

[CEReactions] attribute DOMString id;
[CEReactions] attribute DOMString className;
[CEReactions] attribute DOMString class;
[CEReactions] attribute DOMString className; // legacy alias of .class
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that a bot will make those changes as soon as the spec change lands

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.

5 participants