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 element/attribute name selectors in HTML #13738

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

Conversation

gsnedders
Copy link
Member

Inspired by whatwg/html#3372. This tests the current spec.

<!doctype html>
<title>Test whether namespace prefixes are lowercased</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this test really belong in css/css-namespaces[1], and isn't this already covered by css/css-namespaces/prefix-001.xml ?

[1] https://drafts.csswg.org/css-namespaces-3/#prefixes

Copy link
Member Author

Choose a reason for hiding this comment

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

This is testing:

When comparing a CSS element type selector to the names of HTML elements in HTML documents, the CSS element type selector must first be converted to ASCII lowercase. The same selector when compared to other elements must be compared according to its original case. In both cases, the comparison is case-sensitive.

Specifically because of whatwg/html#4155, and whether the whole CSS Qualified Name is lowercased or whether it's just the local part.

Therefore it's different to css/css-namespaces/prefix-001.xml because it's an HTML element in an HTML document.

Let me add a comment to clarify this.

<meta charset=utf8>
<title>CSS element selector case-sensitivity</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a <link rel=help> with the relevant spec-link?

Copy link
Member Author

Choose a reason for hiding this comment

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

if you don't know, for HTML you can always take the last path segment as a fragment (i.e., #case-sensitivity-of-selectors).

<meta charset=utf8>
<title>CSS attribute name selector case-sensitivity</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a <link rel=help> with the relevant spec-link?

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.

3 participants