1 This tests XPath expressions on detached document fragments and nodes.
2 See https://bugs.webkit.org/show_bug.cgi?id=36427
4 PASS document.evaluate('count(/div)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
5 PASS document.evaluate('count(/html)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
6 PASS document.evaluate('count(/)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
7 PASS document.evaluate('count(//html)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
8 PASS document.evaluate('count(//div)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
9 PASS document.evaluate('count(//h2)', child, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
10 PASS document.evaluate('count(/h1)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
11 PASS document.evaluate('count(/html)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
12 PASS document.evaluate('count(/)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
13 PASS document.evaluate('count(//html)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
14 PASS document.evaluate('count(//p)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 0
15 PASS document.evaluate('count(//h1)', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is 1
16 PASS document.evaluate('/* | *', ele, null, XPathResult.NUMBER_TYPE, null).numberValue is NaN
17 PASS successfullyParsed is true