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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Editing/page-down-with-many-lines.html
diff --git a/third_party/WebKit/PerformanceTests/Editing/page-down-with-many-lines.html b/third_party/WebKit/PerformanceTests/Editing/page-down-with-many-lines.html
new file mode 100644
index 0000000000000000000000000000000000000000..e52f831314887af460678480381625d733c832e8
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Editing/page-down-with-many-lines.html
@@ -0,0 +1,26 @@
+<!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
+const kCharactersPerPage = 482;
+
+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-down on many lines',
+ run: () => {
+ const cursorIndex = text.value.length - 1 - kCharactersPerPage * kCount;
+ text.setSelectionRange(cursorIndex, cursorIndex);
+ for (let counter = 0; counter < kCount; ++counter)
+ testRunner.execCommand("MovePageDown");
+ },
+});
+</script>
« 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