Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / ShadowDOM / ChangingClassName.html
bloba60bf3d20cfa148fc3f99a5984b887b5c7f6cba1
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 <h2>Selected</h2>
10 <div id="selected"></div>
11 <h2>NonSelected</h2>
12 <div id="nonselected"></div>
13 </div>
15 <script>
16 var numDivsInHost = 100;
17 var array = new Array(numDivsInHost);
19 function setup()
21 var nDivs = numDivsInHost;
22 var nonSelected = document.getElementById('nonselected');
24 for (var i = 0; i < nDivs; ++i) {
25 var div = document.createElement('div');
26 div.appendChild(document.createTextNode('div' + i));
27 array[i] = div;
28 nonSelected.appendChild(div);
32 function run()
34 var nDivs = numDivsInHost;
35 var array = window.array;
37 var selected = document.getElementById('selected');
38 var nonSelected = document.getElementById('nonselected');
40 for (var i = 2; i < 100; ++i) {
41 for (var j = 0; j < nDivs; ++j) {
42 if (j % i == 0) {
43 array[j].className = 'selected';
44 selected.appendChild(array[j]);
45 } else {
46 array[j].className = '';
47 nonSelected.appendChild(array[j]);
50 PerfTestRunner.forceLayoutOrFullFrame();
54 function done()
56 wrapper.innerHTML = '';
59 setup();
61 PerfTestRunner.measureTime({
62 description: "Measure distribution and layout performance when className is changed (without ShadowDOM)",
63 run: run,
64 done: done
65 });
66 </script>
67 </body>
68 </html>