blob: d1415894060914f55811b9047975e6971b3aed30 [file] [log] [blame]
This tests XPath expressions on detached document fragments and nodes.
See https://bugs.webkit.org/show_bug.cgi?id=36427
PASS document.evaluate('count(/div)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(/html)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
PASS document.evaluate('count(/)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(//html)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
PASS document.evaluate('count(//div)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(//h2)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(/h1)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(/html)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
PASS document.evaluate('count(/)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('count(//html)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
PASS document.evaluate('count(//p)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
PASS document.evaluate('count(//h1)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
PASS document.evaluate('/* | *', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is NaN
PASS successfullyParsed is true
TEST COMPLETE