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

Unified Diff: third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html

Issue 2730433004: Convert layout test password-delete-performance.html to performance test (Closed)
Patch Set: 2017-03-03T18:04:33 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 | « third_party/WebKit/LayoutTests/editing/deleting/password-delete-contents-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html
diff --git a/third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html b/third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html
new file mode 100644
index 0000000000000000000000000000000000000000..c5c5a9d63697ed8b60d1d89c5a8d9f1b932cabce
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<script src="../resources/runner.js"></script>
+<div id="hidden" style="height:0px; overflow:hidden;"></div>
+<input type="password">
+<script>
+const kCount = 100;
+const hidden = document.getElementById('hidden');
+const password = document.querySelector('input[type=password]');
+hidden.innerHTML= '<p>foo bar</p>'.repeat(999);
+
+PerfTestRunner.measureTime({
+ description: 'Measures performance of delete in password field with many hidden elements',
+ setup: () => {
+ password.value = 'x'.repeat(kCount);
+ password.focus();
+ },
+ run: () => {
+ for (let counter = 0; counter < kCount; ++counter)
+ document.execCommand('delete');
+ },
+});
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/deleting/password-delete-contents-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698