Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <body> | |
| 3 <script src="../resources/runner.js"></script> | |
| 4 <select id="container"></select> | |
| 5 <script> | |
| 6 var container = document.getElementById('container'); | |
| 7 var nodes = []; | |
| 8 var childCount = 500; | |
| 9 for (var i = 0; i < childCount; ++i) { | |
| 10 nodes.push(document.createElement('option')); | |
| 11 nodes[i].selected = !!(i % 2); | |
| 12 } | |
| 13 | |
| 14 PerfTestRunner.measureRunsPerSecond({ | |
| 15 description: "Measures performance of adding option elements to a single-sel ection select element.", | |
|
keishi
2015/11/13 07:16:40
nit: mix of quotes in single file
tkent
2015/11/13 08:07:18
Done.
| |
| 16 run: function() { | |
| 17 for (var i = 0; i < childCount; ++i) | |
| 18 container.appendChild(nodes[i]); | |
| 19 container.innerHTML = ''; | |
| 20 } | |
| 21 }); | |
| 22 </script> | |
| 23 </body> | |
| OLD | NEW |