| <script src="resources/profiler-test-JS-resources.js"></script> |
| internals.setJavaScriptProfilingEnabled(true); |
| console.profile("Anonymous event handler"); |
| var buttonWithAnonymousHandler = document.getElementById("buttonWithAnAnonymousEventHandler") |
| buttonWithAnonymousHandler.onclick = function () { |
| buttonWithAnonymousHandler.click(); |
| <body onload="startTest()"> |
| This page has an anonymous event handler. |
| To run this test manually, load it in the browser then load the WebInspector and look at |
| the profile. It should show the anonymous function at the same level as the onload |
| <input type="button" id="buttonWithAnAnonymousEventHandler" value="Button with an anonymous event handler"> |