| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>innerText performance test with simple line layout.</title> |
| <script src="../resources/runner.js"></script> |
| </head> |
| <body> |
| <pre id="log"></pre> |
| <div id="target" style="width: 300px;"></div> |
| <div id="result"></div> |
| <script> |
| var target = document.getElementById("target"); |
| var result = document.getElementById("result"); |
| for (i = 0; i < 500; ++i) |
| target.appendChild(document.createTextNode("foobar")); |
| |
| function test() { |
| for (i = 0; i < 10; ++i) |
| result.innerText += target.innerText; |
| result.innerText = ""; |
| } |
| |
| function done() { |
| target.innerHTML = ""; |
| } |
| |
| PerfTestRunner.measureRunsPerSecond({ run: test, done: done }); |
| </script> |
| </body> |
| </html> |