Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Side by Side Diff: third_party/WebKit/PerformanceTests/DOM/select-single-add.html

Issue 1445443004: Add performance tests for adding options to a select element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698