blob: 0378b712100e0f383062ef2bb3eb37829e26546f [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