blob: 78c9e415ddf55869a9755d642e2d87b573a34b58 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p>This tests that XPath expressions do not consider (traverse into) template content</p>
<div id=test>
<span>A</span>
<span>B</span>
<template>
<span>C</span>
<span>D</span>
</template>
</div>
<div id="console"></div>
<script>
var test = document.getElementById('test');
var result = document.evaluate('count(//span)', test, null, XPathResult.NUMBER_TYPE, null);
shouldBe("document.evaluate('count(//span)', test, null, XPathResult.NUMBER_TYPE, null).numberValue", "2");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>