blob: 1d41182214dd2398f08f0e9a2f8599d9b49039ce [file] [log] [blame] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<svg id="svg"></svg>
<script>
description("A test case from https://bugs.webkit.org/show_bug.cgi?id=84793. Test passes if it doesn't hit ASSERT(parents.size() &gt;= depth + 1).");
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>
</body>
</html>