• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<script src="resources/profiler-test-JS-resources.js"></script>
4<script>
5console.profile("Many Calls In The Same Scope");
6function startTest()
7{
8    insertNewText();
9    insertGivenText("This was a triumph.");
10    arrayOperatorFunction(7);
11    intermediaryFunction();
12    anonymousFunction();
13    end()
14    endT();
15    endT();
16    endTest();
17}
18
19function end()
20{
21    var x = 0;
22}
23
24function endT()
25{
26    var y = 1;
27}
28
29</script>
30</head>
31
32<body onload="startTest()">
33This page's JavaScript has many function calls in the same scope.
34<br>
35<br>
36To use this test, load it in the browser then load the WebInspector and look at
37the profile.  In the profile many functions should be the children of startTest.
38Use the sorting capabilites to make sure the similarly named functions are sorted
39correctly.
40<div id="output"></div>
41</body>
42</html>