4 <script src=
"../resources/runner.js"></script>
6 for (var i
= 0; i
< 1000; i
++) {
7 var div
= document
.createElement("div");
9 div
.className
= "bar" + i
;
10 document
.body
.appendChild(div
);
13 var h1
= document
.createElement("h1");
15 h1
.className
= "class";
16 document
.body
.lastChild
.appendChild(h1
);
18 PerfTestRunner
.measureRunsPerSecond({
19 description
: "This benchmark tests querySelectorAll() for an element that appears near the tail of the document, and is a child of an element with a given id",
21 for (var i
= 0; i
< 100; i
++) {
22 var res
= document
.querySelectorAll(".bar999 > h1");