| Index: third_party/WebKit/PerformanceTests/DOM/select-single-remove.html
|
| diff --git a/third_party/WebKit/PerformanceTests/DOM/select-single-add.html b/third_party/WebKit/PerformanceTests/DOM/select-single-remove.html
|
| similarity index 50%
|
| copy from third_party/WebKit/PerformanceTests/DOM/select-single-add.html
|
| copy to third_party/WebKit/PerformanceTests/DOM/select-single-remove.html
|
| index 5d921d4e9776914fd4b04ffd79e3a08a02d734ee..5fb13d7679d7f56c8fe7c2d6d6d1e6b8a6c983ab 100644
|
| --- a/third_party/WebKit/PerformanceTests/DOM/select-single-add.html
|
| +++ b/third_party/WebKit/PerformanceTests/DOM/select-single-remove.html
|
| @@ -5,18 +5,22 @@
|
| <script>
|
| var container = document.getElementById('container');
|
| var nodes = [];
|
| -var childCount = 500;
|
| +var childCount = 1000;
|
| for (var i = 0; i < childCount; ++i) {
|
| - nodes.push(document.createElement('option'));
|
| - nodes[i].selected = !!(i % 2);
|
| + var option = document.createElement('option');
|
| + option.textContent = i;
|
| + nodes.push(option);
|
| }
|
|
|
| PerfTestRunner.measureRunsPerSecond({
|
| - description: 'Measures performance of adding option elements to a single-selection select element.',
|
| - run: function() {
|
| + description: 'Measures performance of removing option elements from a single-selection select element.',
|
| +
|
| + run: () => {
|
| for (var i = 0; i < childCount; ++i)
|
| container.appendChild(nodes[i]);
|
| - container.innerHTML = '';
|
| + container.offsetLeft;
|
| + for (var i = 0; i < childCount; ++i)
|
| + container.removeChild(nodes[i]);
|
| }
|
| });
|
| </script>
|
|
|