Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / ShadowDOM / ShadowReprojection.html
blob35b25404be38096605bf49697cf3504af3121685
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type="text/javascript" src="../resources/runner.js"></script>
5 </head>
6 <body>
8 <div id="wrapper">
9 <div id="host"></div>
10 </div>
12 <script>
13 var numDivsInHost = 100;
14 var nLoops = 1000;
16 function setup()
18 var nDivs = numDivsInHost;
20 for (var i = 0; i < nDivs; ++i) {
21 var div = document.createElement('div');
22 div.appendChild(document.createTextNode('div' + i));
23 if (i % 2 == 0)
24 div.className = 'selected';
25 host.appendChild(div);
28 var shadowRoot = host.createShadowRoot();
29 shadowRoot.innerHTML = '<div id="host2"><shadow><content></content></shadow></div>';
31 var host2 = shadowRoot.getElementById('host2');
32 var shadowRoot2 = host2.createShadowRoot();
33 shadowRoot2.innerHTML = '<content select=".selected"></content>';
36 function run()
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();
49 function done()
51 wrapper.innerHTML = '';
54 setup();
56 PerfTestRunner.measureTime({
57 description: "Measure performance of shadow reprojection and distribution",
58 run: run,
59 done: done
60 });
61 </script>
62 </body>
63 </html>