haraken@chromium.org | 0b3e29d | 2012-05-18 07:20:36 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <body> |
| 4 | <div id="foo"></div> |
| 5 | <script src="../resources/runner.js"></script> |
| 6 | <script> |
| 7 | var div = document.getElementById("foo"); |
| 8 | |
rniwa@webkit.org | bf61dcd | 2012-10-17 22:06:52 +0000 | [diff] [blame] | 9 | PerfTestRunner.measureRunsPerSecond({ |
haraken@chromium.org | 0b3e29d | 2012-05-18 07:20:36 +0000 | [diff] [blame] | 10 | description: "This benchmark covers 'setAttribute' in Dromaeo/dom-attr.html and other DOM methods that return an undefined.", |
| 11 | run: function() { |
| 12 | var localDiv = div; |
| 13 | for (var i = 0; i < 10000; i++) |
| 14 | localDiv.setAttribute("id", "foo"); |
| 15 | }}); |
| 16 | </script> |
| 17 | </body> |
| 18 | </html> |