| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="resources/profiler-test-JS-resources.js"></script> | |
| 4 <script> | |
| 5 if (window.testRunner) | |
| 6 testRunner.dumpAsText(); | |
| 7 if (window.internals) | |
| 8 internals.setJavaScriptProfilingEnabled(true); | |
| 9 | |
| 10 function startTest() | |
| 11 { | |
| 12 console.profile("Profiling From A Nested Location"); | |
| 13 | |
| 14 functionWichStopsTheProfiler(); | |
| 15 } | |
| 16 | |
| 17 function functionWichStopsTheProfiler() | |
| 18 { | |
| 19 for (var i = 0; i < 10000000; i++) | |
| 20 var b = i + 2; | |
| 21 | |
| 22 console.profileEnd("Profiling From A Nested Location"); | |
| 23 printProfilesDataWithoutTime(); | |
| 24 } | |
| 25 | |
| 26 </script> | |
| 27 </head> | |
| 28 | |
| 29 <body onload="startTest()"> | |
| 30 This page's JavaScript starts profiling from within a nested location. | |
| 31 <br> | |
| 32 <br> | |
| 33 To run this test manually, load it in the browser then load the WebInspector and
look at | |
| 34 the profile. In the profile there should be a call to functionWichStopsTheProfi
ler(). | |
| 35 <div id="output"></div> | |
| 36 </body> | |
| 37 </html> | |
| OLD | NEW |