4 <script type=
"text/javascript" src=
"../resources/runner.js"></script>
13 var numDivsInHost
= 256;
15 var classNames
= ['A', 'B', 'C', 'D', 'E'];
19 var nDivs
= numDivsInHost
;
21 for (var i
= 0; i
< nDivs
; ++i
) {
22 var div
= document
.createElement('div');
23 div
.appendChild(document
.createTextNode('div' + i
));
25 var names
= new Array();
26 for (var j
= 0; j
< classNames
.length
; ++j
) {
28 names
.push(classNames
[j
]);
30 div
.className
= names
.join(' ');
32 host
.appendChild(div
);
35 var shadowRoot
= host
.createShadowRoot();
36 for (var i
= 0; i
< classNames
.length
; ++i
) {
37 var content
= document
.createElement('content');
38 content
.setAttribute('select', '.' + classNames
[i
]);
39 shadowRoot
.appendChild(content
);
41 shadowRoot
.appendChild(document
.createElement('content'));
46 var host
= document
.getElementById('host');
47 var nLoops
= window
.nLoops
;
49 var div
= document
.createElement('div');
50 for (var i
= 0; i
< nLoops
; ++i
) {
51 host
.appendChild(div
);
52 host
.removeChild(div
);
53 PerfTestRunner
.forceLayoutOrFullFrame();
59 wrapper
.innerHTML
= '';
65 PerfTestRunner
.measureTime({
66 description
: "Measure Distribution and Layout time in a case there are multiple InsertionPoints",