OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <svg id="svg"></svg> | 7 <svg id="svg"></svg> |
8 <p>A test case from https://bugs.webkit.org/show_bug.cgi?id=84793. | 8 <p>A test case from https://bugs.webkit.org/show_bug.cgi?id=84793. |
9 <p>Test passes if it doesn't hit ASSERT(parents.size() >= depth + 1). | 9 <p>Test passes if it doesn't hit ASSERT(parents.size() >= depth + 1). |
10 <div id="console"></div> | 10 <div id="console"></div> |
11 | 11 |
12 <script> | 12 <script> |
13 resolver = function (prefix) { | 13 resolver = function (prefix) { |
14 var ns = { | 14 var ns = { |
15 "svg" : "http://www.w3.org/2000/svg", | 15 "svg" : "http://www.w3.org/2000/svg", |
16 "xhtml" : "http://www.w3.org/1999/xhtml", | 16 "xhtml" : "http://www.w3.org/1999/xhtml", |
17 }; | 17 }; |
18 return ns[prefix] || null; | 18 return ns[prefix] || null; |
19 } | 19 } |
20 | 20 |
21 var result= document.evaluate("/node()/descendant-or-self::svg:* | node()/ance
stor-or-self::node()", document.getElementById("svg").ownerDocument.importNode(d
ocument.documentElement), resolver, XPathResult.NUMBER_TYPE, result); | 21 var result= document.evaluate("/node()/descendant-or-self::svg:* | node()/ance
stor-or-self::node()", document.getElementById("svg").ownerDocument.importNode(d
ocument.documentElement), resolver, XPathResult.NUMBER_TYPE, result); |
22 shouldBe("result.numberValue", "NaN"); | 22 shouldBe("result.numberValue", "NaN"); |
23 </script> | 23 </script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |