-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 liveness of NodeLists/HTMLCollections #8993
Add tests for liveness of NodeLists/HTMLCollections #8993
Conversation
Build PASSEDStarted: 2018-01-11 08:26:28 View more information about this build on: |
From https://pulls.web-platform-tests.org/build/22635 it looks like all browsers pass all of these tests. That's a bit surprising, are things here really perfectly interoperable? @Ms2ger, when you filed #1505, were you aware of anything in particular in need of testing? |
@foolip for most of these, much of the web would be badly broken if they weren't live, so I'm not surprised by interop. |
I don't recall if there were any bugs I knew of at that time; I think I would have said so if I did. |
@Ms2ger, any comments on my tests? |
Haven't had time to review them yet. |
I wonder if it's worth testing childNodes with an innerHTML manipulation. |
@tkent-google, is this something you could review? |
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 prefer adding liveness tests to each of API test files to adding a single liveness test file for various API.
e.g. The first test() in Node-collection-live.html should be in dom/nodes/Node-childNodes.html.
@tkent-google, sorry for late response, I have addressed your comments in new commit, PTAL. |
- Node#childNodes - ParentNode#children - {Document,Element}#getElementsByTagName - {Document,Element}#getElementsByTagNameNS - {Document,Element}#getElementsByClassName - Document#images - Document#embeds - Document#plugins - Document#links - Document#forms - Document#scripts - Document#getElementsByName
@@ -18,4 +18,23 @@ | |||
assert_false(list instanceof NodeList, "NodeList") | |||
assert_true(list instanceof HTMLCollection, "HTMLCollection") | |||
}, "Interface should be correct.") | |||
test(function() { |
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.
Add a blank line before this line.
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.
Updated
|
||
element.removeChild(t2); | ||
assert_equals(l.length, 1); | ||
}, "getElementsByTagName() return an HTMLCollection is liveness"); |
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.
The test description looks weird grammatically.
Should it be "getElementsByTagName() should be a live collection" or something?
This comment should be applied to all of new tests.
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, @tkent-google, updated the test descriptions.
f7db513
to
9a91102
Compare
Add following tests (Fix #1505):
@Ms2ger, PTAL.