Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / DOM / textarea-dom.html
blobb9bd1e2a181007f43bc51cd51e649299985815bb
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 var nodes = [];
16 var childCount = 1000;
17 for (var i = 0; i < childCount; ++i)
18 nodes.push(document.createTextNode('A quick brown fox jumps over the lazy dog.\n'));
20 PerfTestRunner.measureRunsPerSecond({
21 description: "Measures performance of adding text nodes to a textarea, then clearing it.",
22 run: function() {
23 for (var i = 0; i < childCount; ++i)
24 container.appendChild(nodes[i]);
25 container.innerHTML = '';
27 });
28 </script>
29 </body>