| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <svg id="svg"></svg> |
| <p>A test case from https://bugs.webkit.org/show_bug.cgi?id=84793. |
| <p>Test passes if it doesn't hit ASSERT(parents.size() >= depth + 1). |
| <div id="console"></div> |
| |
| <script> |
| resolver = function (prefix) { |
| var ns = { |
| "svg" : "http://www.w3.org/2000/svg", |
| "xhtml" : "http://www.w3.org/1999/xhtml", |
| }; |
| return ns[prefix] || null; |
| } |
| |
| var result= document.evaluate("/node()/descendant-or-self::svg:* | node()/ancestor-or-self::node()", document.getElementById("svg").ownerDocument.importNode(document.documentElement), resolver, XPathResult.NUMBER_TYPE, result); |
| shouldBe("result.numberValue", "NaN"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |