| Index: third_party/WebKit/PerformanceTests/Mutation/remove-child-with-ranges.html
|
| diff --git a/third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html b/third_party/WebKit/PerformanceTests/Mutation/remove-child-with-ranges.html
|
| similarity index 71%
|
| copy from third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html
|
| copy to third_party/WebKit/PerformanceTests/Mutation/remove-child-with-ranges.html
|
| index 3795428eec51c908caaa9e7d0bfdbdaede076458..9683af86b67322b2815fff77bdd1bd6948122227 100644
|
| --- a/third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html
|
| +++ b/third_party/WebKit/PerformanceTests/Mutation/remove-child-with-ranges.html
|
| @@ -1,5 +1,5 @@
|
| <!DOCTYPE html>
|
| -<!-- Identical to "append-child.html" but having 100 active ranges -->
|
| +<!-- Identical to "remove-child.html" but having 100 active ranges -->
|
| <body>
|
| <pre id="log"></pre>
|
| <script src="../resources/runner.js"></script>
|
| @@ -10,7 +10,7 @@ for (var i = 0; i < 50000; ++i)
|
| elems[i] = document.createElement('div');
|
|
|
| var ranges = [];
|
| -for (var i = 0; i < 100; ++i) {
|
| +for (var i = 0; i < 1000; ++i) {
|
| var range = new Range();
|
| ranges[i] = range;
|
| range.selectNodeContents(document.body);
|
| @@ -19,10 +19,12 @@ for (var i = 0; i < 100; ++i) {
|
| var sandbox = document.getElementById('sandbox');
|
|
|
| PerfTestRunner.measureRunsPerSecond({
|
| - description: 'Measures performance of appendChild with active Range objects',
|
| + description: 'Measures performance of removeChild with active Range objects',
|
| run: function() {
|
| for (var elem of elems)
|
| sandbox.appendChild(elem);
|
| + while (sandbox.firstChild)
|
| + sandbox.firstChild.remove();
|
| }
|
| });
|
| </script>
|
|
|