Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: third_party/WebKit/PerformanceTests/Editing/page-down-with-many-lines.html

Issue 2696133002: Add performance tests of page up/down key navigation (Closed)
Patch Set: update Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698