haikuwebkit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify-ex...

20 lines
817 B
Plaintext

This tests that the querySelector, querySelectorAll and matchesSelector (webkitMatchesSelector) correctly stringify null and undefined to "null" and "undefined".
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelector(null) is nullNode
PASS document.querySelector(undefined) is undefinedNode
PASS document.querySelectorAll(null).length is 1
PASS document.querySelectorAll(null).item(0) is nullNode
PASS document.querySelectorAll(undefined).length is 1
PASS document.querySelectorAll(undefined).item(0) is undefinedNode
PASS nullNode.matches(null) is true
PASS undefinedNode.matches(undefined) is true
PASS nullNode.webkitMatchesSelector(null) is true
PASS undefinedNode.webkitMatchesSelector(undefined) is true
PASS successfullyParsed is true
TEST COMPLETE