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

Side by Side Diff: third_party/WebKit/PerformanceTests/DOM/page-up-with-many-lines.html

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