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..25b55c03118a2fa89b10669db5d7c7b1d315d1fc |
| --- /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 = 1000; |
| +const hidden = document.getElementById('hidden'); |
| +const password = document.querySelector('input[type=password]'); |
| + |
| +PerfTestRunner.measureTime({ |
| + description: 'Measures performance of delete in password field with many hidden elements', |
| + setup: () => { |
| + password.focus(); |
| + hidden.innerHTML= '<p>foo bar</p>'.repeat(999); |
|
yoichio
2017/03/03 02:07:22
This line can be before mesureTime?
yosin_UTC9
2017/03/03 09:07:12
Done.
|
| + }, |
| + run: () => { |
| + for (let counter = 0; counter < kCount; ++counter) { |
| + password.value = 'a'; |
|
yoichio
2017/03/03 02:07:22
In the setup, set password.value = 'abcdfef..."
en
yosin_UTC9
2017/03/03 09:07:12
Done.
|
| + document.execCommand('delete'); |
| + } |
| + }, |
| +}); |
| +</script> |