4 <script type=
"text/javascript" src=
"../resources/runner.js"></script>
13 var numShadowRoots
= 20;
14 var numDivsInHost
= 10;
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
));
24 host
.appendChild(div
);
27 for (var i
= 0; i
< numShadowRoots
; ++i
) {
28 var shadow
= document
.createElement('shadow');
29 var content
= document
.createElement('content');
30 shadow
.appendChild(content
);
31 var shadowRoot
= host
.createShadowRoot();
32 shadowRoot
.appendChild(shadow
);
38 var host
= document
.getElementById('host');
39 var nLoops
= window
.nLoops
;
41 var div
= document
.createElement('div');
42 for (var i
= 0; i
< nLoops
; ++i
) {
43 host
.appendChild(div
);
44 host
.removeChild(div
);
45 PerfTestRunner
.forceLayoutOrFullFrame();
51 wrapper
.innerHTML
= '';
57 PerfTestRunner
.measureTime({
58 description
: "Measure Distribution and Layout time in a case there are multiple ShadowRoots",