blob: 5d921d4e9776914fd4b04ffd79e3a08a02d734ee [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'));
nodes[i].selected = !!(i % 2);
}
PerfTestRunner.measureRunsPerSecond({
description: 'Measures performance of adding option elements to a single-selection select element.',
run: function() {
for (var i = 0; i < childCount; ++i)
container.appendChild(nodes[i]);
container.innerHTML = '';
}
});
</script>
</body>