4 <script type=
"text/javascript" src=
"../resources/runner.js"></script>
10 <div id=
"selected"></div>
12 <div id=
"nonselected"></div>
16 var numDivsInHost
= 100;
17 var array
= new Array(numDivsInHost
);
21 var nDivs
= numDivsInHost
;
22 var nonSelected
= document
.getElementById('nonselected');
24 for (var i
= 0; i
< nDivs
; ++i
) {
25 var div
= document
.createElement('div');
26 div
.appendChild(document
.createTextNode('div' + i
));
28 nonSelected
.appendChild(div
);
34 var nDivs
= numDivsInHost
;
35 var array
= window
.array
;
37 var selected
= document
.getElementById('selected');
38 var nonSelected
= document
.getElementById('nonselected');
40 for (var i
= 2; i
< 100; ++i
) {
41 for (var j
= 0; j
< nDivs
; ++j
) {
43 array
[j
].className
= 'selected';
44 selected
.appendChild(array
[j
]);
46 array
[j
].className
= '';
47 nonSelected
.appendChild(array
[j
]);
50 PerfTestRunner
.forceLayoutOrFullFrame();
56 wrapper
.innerHTML
= '';
61 PerfTestRunner
.measureTime({
62 description
: "Measure distribution and layout performance when className is changed (without ShadowDOM)",