| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body> | 2 <body> |
| 3 <style> | 3 <style> |
| 4 textarea:valid { | 4 textarea:valid { |
| 5 background-color: lime; | 5 background-color: lime; |
| 6 } | 6 } |
| 7 textarea:invalid { | 7 textarea:invalid { |
| 8 background-color: red; | 8 background-color: red; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <script src="../resources/runner.js"></script> | 11 <script src="../resources/runner.js"></script> |
| 12 <div id="container"></div> | 12 <div id="container"></div> |
| 13 <script> | 13 <script> |
| 14 var htmlText = "<textarea maxlength=2147483647>"; | 14 var htmlText = "<textarea maxlength=2147483647>"; |
| 15 for (var i = 0; i < 1000; ++i) { | 15 for (var i = 0; i < 1000; ++i) { |
| 16 htmlText += "A quick brown fox jumps over the lazy dog.\n" + | 16 htmlText += "A quick brown fox jumps over the lazy dog.\n" + |
| 17 "A quick brown fox jumps over the lazy dog.\n" + | 17 "A quick brown fox jumps over the lazy dog.\n" + |
| 18 "<!-- comment -->\n"; | 18 "<!-- comment -->\n"; |
| 19 } | 19 } |
| 20 htmlText += "</textarea>" | 20 htmlText += "</textarea>" |
| 21 | 21 |
| 22 var container = document.getElementById('container'); | 22 var container = document.getElementById('container'); |
| 23 PerfTestRunner.measureRunsPerSecond({run: function() { | 23 PerfTestRunner.measureRunsPerSecond({ |
| 24 container.innerHTML = htmlText; | 24 description: "Measures performance of parsing within a <textarea> tag.", |
| 25 }}); | 25 run: function() { |
| 26 container.innerHTML = htmlText; |
| 27 } |
| 28 }); |
| 26 </script> | 29 </script> |
| 27 </body> | 30 </body> |
| OLD | NEW |