blob: ee974d9fe588764a7f6be920e76ab3e0840c26f2 [file] [log] [blame]
zalan@apple.comc461d3e2015-04-09 18:57:33 +00001<!DOCTYPE html>
2<html>
3<head>
4 <title>innerText performance test with simple line layout.</title>
5 <script src="../resources/runner.js"></script>
6</head>
7<body>
8 <pre id="log"></pre>
9 <div id="target" style="width: 300px;"></div>
10 <div id="result"></div>
11 <script>
12 var target = document.getElementById("target");
13 var result = document.getElementById("result");
14 for (i = 0; i < 500; ++i)
15 target.appendChild(document.createTextNode("foobar"));
16
17 function test() {
18 for (i = 0; i < 10; ++i)
19 result.innerText += target.innerText;
20 result.innerText = "";
21 }
zalan@apple.com35112352015-04-13 18:04:55 +000022
23 function done() {
24 target.innerHTML = "";
25 }
26
27 PerfTestRunner.measureRunsPerSecond({ run: test, done: done });
zalan@apple.comc461d3e2015-04-09 18:57:33 +000028 </script>
29</body>
30</html>