4 <script type=
"text/javascript" src=
"../resources/runner.js"></script>
13 var numDivsInHost
= 100;
14 var typeNames
= ['A', 'B', 'C'];
15 var array
= new Array(numDivsInHost
);
19 var nDivs
= numDivsInHost
;
21 window
.shadowRoot
= host
.createShadowRoot();
22 shadowRoot
.innerHTML
= '<h2>Selected</h2><div id="selected"><content select=".selected"></content></div><h2>NonSelected</h2><div id="nonselected"><content></content></div>';
24 for (var i
= 0; i
< nDivs
; ++i
) {
25 var div
= document
.createElement('div');
26 div
.appendChild(document
.createTextNode('div' + i
));
27 div
.className
= typeNames
[i
% typeNames
.length
];
28 host
.appendChild(div
);
35 var nDivs
= numDivsInHost
;
36 var array
= window
.array
;
38 var selected
= shadowRoot
.getElementById('selected');
39 var nonSelected
= shadowRoot
.getElementById('nonselected');
40 var contentSelected
= selected
.querySelector('content');
42 for (var i
= 0; i
< 100; ++i
) {
43 for (var j
= 0; j
< typeNames
.length
; ++j
) {
44 contentSelected
.select
= '.' + typeNames
[j
];
45 PerfTestRunner
.forceLayoutOrFullFrame();
52 wrapper
.innerHTML
= '';
58 PerfTestRunner
.measureTime({
59 description
: "Measure distribution and layout performance when select attribute is changed",