blob: 3486400a6e6a10bd156d9ba39076e86bd7936525 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.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>
</body>
</html>