OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../resources/runner.js"></script> |
| 3 <textarea id="text" style="width:300px; height:300px" spellcheck="false"></texta
rea> |
| 4 <script> |
| 5 const kCount = 10; |
| 6 const kLines = 20000 |
| 7 |
| 8 text.textContent = (() => { |
| 9 const result = []; |
| 10 for (let count = 0; count < kLines; ++count) |
| 11 result.push(`${('00000' + count).slice(-5)} of brown foxes\n`); |
| 12 return result.join(''); |
| 13 })(); |
| 14 text.focus(); |
| 15 |
| 16 PerfTestRunner.measureRunsPerSecond({ |
| 17 description: 'Measures performance of move-page-up on many lines', |
| 18 run: () => { |
| 19 const cursorIndex = text.value.length - 1; |
| 20 text.setSelectionRange(cursorIndex, cursorIndex); |
| 21 for (let counter = 0; counter < kCount; ++counter) |
| 22 testRunner.execCommand("MovePageUp"); |
| 23 }, |
| 24 }); |
| 25 </script> |
OLD | NEW |