4 <script src=
"../resources/runner.js"></script>
6 var parentDiv
= document
.body
;
7 for (var i
= 0; i
< 1000; i
++) {
8 var div
= document
.createElement("div");
10 div
.className
= "bar" + i
;
11 parentDiv
.appendChild(div
);
15 var h1
= document
.createElement("h1");
17 h1
.className
= "class";
18 parentDiv
.appendChild(h1
);
20 PerfTestRunner
.measureRunsPerSecond({
21 description
: "This benchmark tests querySelector() for an element that appears in the depths in the document, and is a descendant of an element with a given id",
23 for (var i
= 0; i
< 100; i
++) {
24 var res
= document
.querySelector("#foo998 h1");