blob: 0addb63ccd0212f5b8a75ef845411f1a9a11d31b [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<select id="container"></select>
<script>
var container = document.getElementById('container');
var nodes = [];
var childCount = 500;
for (var i = 0; i < childCount; ++i)
nodes.push(document.createElement('option'));
PerfTestRunner.measureRunsPerSecond({
description: 'Measures performance of adding option elements to a single-selection select element.',
run: function() {
for (var i = 0; i < childCount; ++i) {
nodes[i].selected = !!(i % 2);
container.appendChild(nodes[i]);
}
container.innerHTML = '';
}
});
</script>
</body>