Chromium Code Reviews| 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..492504e0eef472ad60d28e4dbd1f4fa74e007067 |
| --- /dev/null |
| +++ b/third_party/WebKit/PerformanceTests/Editing/delete-in-password-field.html |
| @@ -0,0 +1,23 @@ |
| +<!doctype html> |
| +<script src="../resources/runner.js"></script> |
| +<div id="hidden" style="height:0px; overflow:hidden;"></div> |
| +<input type="password"> |
| +<script> |
| +const kCount = 10; |
| +const hidden = document.getElementById('hidden'); |
| +const password = document.querySelector('input[type=password]'); |
| + |
| +PerfTestRunner.measureRunsPerSecond({ |
|
yoichio
2017/03/02 09:07:42
Could you use |PerfTestRunner.measureTime| instead
yosin_UTC9
2017/03/02 09:19:04
Yay! It is more readable.
Thanks!
|
| + description: 'Measures performance of delete in password field with many hidden elements', |
| + setup: () => { |
| + password.focus(); |
| + hidden.innerHTML= '<p>foo bar</p>'.repeat(999); |
| + }, |
| + run: () => { |
| + for (let counter = 0; counter < kCount; ++counter) { |
| + password.value = 'a'; |
| + document.execCommand('delete'); |
| + } |
| + }, |
| +}); |
| +</script> |