Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / DOM / textarea-edit.html
blob0a71485efd0ff4ba09dfab3ebeb6ff86a9a8054e
1 <!DOCTYPE html>
2 <body>
3 <style>
4 textarea:valid {
5 background-color: lime;
7 textarea:invalid {
8 background-color: red;
10 </style>
11 <script src="../resources/runner.js"></script>
12 <textarea maxlength=2147483647 id="container"></textarea>
13 <script>
14 var container = document.getElementById('container');
15 container.focus();
16 PerfTestRunner.measureRunsPerSecond({
17 description: "Measures performance of adding text to a textarea using document.execCommand, then clearing it.",
18 run: function() {
19 for (var i = 0; i < 500; ++i)
20 document.execCommand('insertText', false, 'A quick brown fox jumps over the lazy dog.\n');
21 container.value = '';
23 });
24 </script>
25 </body>