| <!DOCTYPE html> |
| <html> |
| <body> |
| <div id="testDiv"> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| <p></p> |
| <p class="test"></p> |
| </div> |
| <script src="../resources/runner.js"></script> |
| <script> |
| var testDiv = document.getElementById("testDiv"); |
| PerfTestRunner.measureRunsPerSecond({ |
| description: "This benchmark covers 'Element.children'.", |
| run: function() { |
| for (var i = 0; i < 100; i++) { |
| var elements = testDiv.children; |
| for (var j = 0; j < elements.length; j++) |
| elements[j]; |
| } |
| } |
| }); |
| </script> |
| </body> |
| </html> |