2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / profiler / many-calls-in-the-same-scope.html
blobfa954bbd1820bf93ff46424f4a405b64099b76e1
1 <html>
2 <head>
3 <script src="resources/profiler-test-JS-resources.js"></script>
4 <script>
5 if (window.layoutTestController) {
6 layoutTestController.dumpAsText();
7 layoutTestController.setJavaScriptProfilingEnabled(true);
10 function startTest()
12 console.profile("Many Calls In The Same Scope");
14 insertNewText();
15 insertGivenText("This was a triumph.");
16 arrayOperatorFunction(7);
17 intermediaryFunction();
18 anonymousFunction();
19 end()
20 endT();
21 endT();
23 endTest();
26 function end()
28 var x = 0;
31 function endT()
33 var y = 1;
36 </script>
37 </head>
39 <body onload="startTest()">
40 This page's JavaScript has many function calls in the same scope.
41 <br>
42 <br>
43 To run this test manually, load it in the browser then load the WebInspector and look at
44 the profile. In the profile many functions should be the children of startTest.
45 Use the sorting capabilites to make sure the similarly named functions are sorted
46 correctly.
47 <div id="output"></div>
48 </body>
49 </html>