| 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 const kCharactersPerPage = 482; |
| 8 |
| 9 text.textContent = (() => { |
| 10 const result = []; |
| 11 for (let count = 0; count < kLines; ++count) |
| 12 result.push(`${('00000' + count).slice(-5)} of brown foxes\n`); |
| 13 return result.join(''); |
| 14 })(); |
| 15 text.focus(); |
| 16 |
| 17 PerfTestRunner.measureRunsPerSecond({ |
| 18 description: 'Measures performance of move-page-down on many lines', |
| 19 run: () => { |
| 20 const cursorIndex = text.value.length - 1 - kCharactersPerPage * kCount; |
| 21 text.setSelectionRange(cursorIndex, cursorIndex); |
| 22 for (let counter = 0; counter < kCount; ++counter) |
| 23 testRunner.execCommand("MovePageDown"); |
| 24 }, |
| 25 }); |
| 26 </script> |
| OLD | NEW |