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 REFERENCE-IN-OTHER-TYPE lint #46120

Merged
merged 4 commits into from
May 11, 2024

Conversation

gsnedders
Copy link
Member

@gsnedders gsnedders commented May 6, 2024

Fixes #46058, and fixes a bunch of the failures it catches.

@@ -2,7 +2,6 @@
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-break-3/#transforms">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#relative-positioning">
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this test would benefit from a "testharness is a child of <head>" lint :p

Copy link
Contributor

Choose a reason for hiding this comment

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

They are in the head. An explicit head tag is optional in HTML.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the <div> below implicitly closes head and creates a body.

See:
A screenshot of the Web Inspector showing the tree, as explained above

According to the manifest these are all testharness tests, but WebKit's
historic slightly different logic has led to these being run in a bogus
state previously (where they were treated as both a reftest and a
testharness test all at once).
It's not overly meaningful to have a reference while also being manual,
and all this is really testing is that the click event is fired, so
let's just turn this into a testharness test using testdriver.
We already check whether tests crash, so we may as well check the
rendering too.
This is similar to the TESTHARNESS-IN-OTHER-TYPE lint
@gsnedders gsnedders merged commit 8f48f40 into web-platform-tests:master May 11, 2024
43 of 45 checks passed
@gsnedders gsnedders deleted the better-lint branch May 11, 2024 00:38
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.

lint for tests with link rel=match and testharness.js
6 participants