7 <script src=
"../resources/runner.js"></script>
10 window
.onload = function() {
11 PerfTestRunner
.measureTime({
12 description
: "Measures performance of creating and rendering elements with shadow roots from templates (contains class descendant selector styles).",
14 var list
= document
.querySelector('#list');
15 var tmpl
= document
.querySelector("#tmpl");
17 var start
= PerfTestRunner
.now();
20 var host
= document
.createElement('div');
21 var root
= host
.createShadowRoot();
22 root
.appendChild(tmpl
.content
.cloneNode(true));
23 var light
= document
.createElement('div');
24 list
.appendChild(host
);
25 } while (++i
< listSize
);
27 PerfTestRunner
.forceLayoutOrFullFrame();
28 return PerfTestRunner
.now() - start
;
35 .foo .bar .foo.bar.baz {
44 <div class=
"foo bar baz">item
</div>
49 <section id=
"list"></section>