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
update wpt #2951
update wpt #2951
Conversation
f906e93
to
b645484
Compare
I write a script to auto update to-run.yaml, but not sure if this project need. Array of yaml can fold and unfold, this's very convenient, and sort tests can be done automatically. This update bring about one hundred fail, I only found out a few reasons of them. |
Please revert the dramatic formatting changes to to-run.yml! The file is intended to be a flat list. |
I pushed a commit which undoes the dramatic reformatting of to-run.yaml and goes through and updates it for a few cases. It still needs more updates, but hopefully you, or another project contributor, can do that without destroying the readability and editability of the file. |
89bb4b0
to
d5b4fcb
Compare
@TimothyGu Sorry, I push this file by accident thank you for reminding. |
Thanks very much for all your hard work here @zjffun. It looks like you're almost done. Let us know if we can help. |
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.
If you could mark this as fixing #2935, that would be super helpful.
...m-tests/to-upstream/html/semantics/forms/the-label-element/clicking-interactive-content.html
Outdated
Show resolved
Hide resolved
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 misunderstood before, not all elements has activation behavior are interactive content. like HTMLAreaElement
My pleasure. There is a question need help : I write a small script, it's not good and only work in current |
@@ -37,10 +39,11 @@ class HTMLElementImpl extends ElementImpl { | |||
// https://html.spec.whatwg.org/multipage/dom.html#the-translate-attribute | |||
get translate() { | |||
const translateAttr = this.getAttributeNS(null, "translate"); | |||
const translateAttrString = asciiLowercase(translateAttr || ""); |
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.
How about an early return here if (translateAttr === null)
. This way we can avoid the awkward check below.
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.
This seems want to do the things in the table below. I can't think a better implementation. @domenic
translateAttr | null | '' | 'yes' | 'no' | 'gibberish' |
asciiLowercase | '' | '' | 'yes' | 'no' | 'gibberish' |
return | the logic behind | true | true | false | the logic behind |
It's weird that |
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.
Thanks again for all your work. I'd be happy to take this forward and fix the rest of the issues, which are primarily stylistic.
} | ||
|
||
set _hasActivationBehavior(v) {} |
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.
Is the setter necessary?
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.
Remove those two setters will cause error, becauce the parent class HTMLElement
need set _hasActivationBehavior
and code within the class body's syntactic boundary is always executed in strict mode.
https://github.com/zjffun/jsdom/blob/rm-assert-throw/lib/jsdom/living/nodes/HTMLElement-impl.js#L23
} | ||
|
||
set _hasActivationBehavior(v) {} |
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.
Is the setter necessary?
|
||
function resolveWpt(...paths) { | ||
return path.resolve(__dirname, "../", ...paths); | ||
} |
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.
This looks somewhat useful, but it doesn't look like the result is being used in this PR. Is my understanding correct?
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.
Dealing with all the TempUnknown
and delete a few lines of this script's result is the current to-run.yaml
.
Emm.. This script can get all fail tests that not in to-run.yaml
, and add them in the right place of to-run.yaml
with TempUnknown
as reason.
The |
72e688b
to
1eaf549
Compare
@@ -476,12 +485,14 @@ sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.h | |||
sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html: [fail, scrollIntoView() not implemented] | |||
sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html: [fail, scrollIntoView() not implemented] | |||
sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html: [fail, scrollIntoView() not implemented] | |||
tabindex-focus-flag.html: [fail, https://github.com/jsdom/jsdom/pull/2965] |
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.
8e26a1a
to
19d4b23
Compare
Thanks everyone for the review. I reorganized commits of this pr, if there is anything else I need to do please @ me. |
I self reviewed this PR and found that it was messy and had some errors, so I split them into separate branches. This PR only keeps the changes of update wpt. In this PR the merged test cases are deleted, and the test under the html/canvas folder is set to require canvas. Some failed tests cannot be expressed using wildcards, because some of them will pass even if they are not implemented. Like Some fixes for the new test cases:
|
This is amazing; thank you very much. I appreciate the splitting; that definitely will make things easier. I'll get this merged now and then we can proceed with the other PRs and branches. |
I noticed a few of the deleted files are not landed in web platform tests upstream. I will un-delete them. |
assert_throws
connect ECONNREFUSED
to-run.yaml
to-run.yaml