[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.24
[framework/web/webkit-efl.git] / PerformanceTests / Bindings / insert-before.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/runner.js"></script>
5 <script>
6 var div = document.createElement("div");
7 var childDiv = document.createElement("div");
8
9 PerfTestRunner.runPerSecond({
10     description: "This benchmark covers 'insertBefore' in Dromaeo/dom-modify.html and replaceChild()",
11     setup: function() {
12         div.innerHTML = "";
13         div.appendChild(childDiv);
14     },
15     run: function() {
16         var localDiv = div;
17         var localFirstChildOfDiv = div.firstChild;
18         var localChildDiv = childDiv;
19         for (var i = 0; i < 50000; i++)
20             localDiv.insertBefore(localChildDiv, localFirstChildOfDiv);
21 }});
22 </script>
23 </body>
24 </html>