| Index: third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html
|
| diff --git a/third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html b/third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d21819e1d3deed135680a5763791e1ffe9a67534
|
| --- /dev/null
|
| +++ b/third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html
|
| @@ -0,0 +1,25 @@
|
| +<!doctype html>
|
| +<script src="../resources/runner.js"></script>
|
| +<textarea id="text" style="width:300px; height:300px" spellcheck="false"></textarea>
|
| +<script>
|
| +const kCount = 10;
|
| +const kLines = 20000
|
| +
|
| +text.textContent = (() => {
|
| + const result = [];
|
| + for (let count = 0; count < kLines; ++count)
|
| + result.push(`${('00000' + count).slice(-5)} of brown foxes\n`);
|
| + return result.join('');
|
| +})();
|
| +text.focus();
|
| +
|
| +PerfTestRunner.measureRunsPerSecond({
|
| + description: 'Measures performance of move-page-up on many lines',
|
| + run: () => {
|
| + const cursorIndex = text.value.length - 1;
|
| + text.setSelectionRange(cursorIndex, cursorIndex);
|
| + for (let counter = 0; counter < kCount; ++counter)
|
| + testRunner.execCommand("MovePageUp");
|
| + },
|
| +});
|
| +</script>
|
|
|