blob: d938b2ea6fb5cacd3229e8a06f88845074583715 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<div id="testDiv">
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
<p></p>
<p class="test"></p>
</div>
<script src="../resources/runner.js"></script>
<script>
var testDiv = document.getElementById("testDiv");
PerfTestRunner.measureRunsPerSecond({
description: "This benchmark covers 'Element.childNodes'.",
run: function() {
for (var i = 0; i < 100; i++) {
var nodes = testDiv.childNodes;
for (var j = 0; j < nodes.length; j++)
nodes[j];
}
}
});
</script>
</body>
</html>