OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../resources/timeline-data.js"></script> | 5 <script src="../resources/timeline-data.js"></script> |
6 <script> | 6 <script> |
7 function test() | 7 function test() |
8 { | 8 { |
9 var cpuProfile = { | 9 var cpuProfile = { |
10 startTime: 10, | 10 startTime: 10, |
11 endTime: 20, | 11 endTime: 20, |
12 nodes: [ | 12 nodes: [ |
13 { | 13 { |
14 id: 0, | 14 id: 0, |
15 callFrame: { functionName: "(root)" }, | 15 callFrame: { functionName: "(root)" }, |
16 hitCount: 0, | 16 hitCount: 0, |
17 children: [1, 2] | 17 children: [1, 2] |
18 }, | 18 }, |
19 { | 19 { |
20 id: 1, | 20 id: 1, |
21 callFrame: { functionName: "foo1" }, | 21 callFrame: { functionName: "foo1" }, |
22 hitCount: 100, | 22 hitCount: 100, |
23 positionTicks: [{line:1, ticks:10}, {line:2, ticks:20}, {line:3,
ticks:30}, {line:4, ticks:40}], | 23 positionTicks: [{line:1, ticks:10}, {line:2, ticks:20}, {line:3,
ticks:30}, {line:4, ticks:40}] |
24 children: [] | |
25 }, | 24 }, |
26 { | 25 { |
27 id: 2, | 26 id: 2, |
28 callFrame: { functionName: "foo2" }, | 27 callFrame: { functionName: "foo2" }, |
29 hitCount: 200, | 28 hitCount: 200, |
30 positionTicks: [{line:100, ticks:1}, {line:102, ticks:190}], | 29 positionTicks: [{line:100, ticks:1}, {line:102, ticks:190}], |
31 children: [3] | 30 children: [3] |
32 }, | 31 }, |
33 { | 32 { |
34 id: 3, | 33 id: 3, |
35 callFrame: { functionName: "null" }, | 34 callFrame: { functionName: "null" }, |
36 hitCount: 0, | 35 hitCount: 0, |
37 positionTicks: [], | 36 positionTicks: [], |
38 children: [4, 5] | 37 children: [4, 5] |
39 }, | 38 }, |
40 { | 39 { |
41 id: 4, | 40 id: 4, |
42 callFrame: { functionName: "bar" }, | 41 callFrame: { functionName: "bar" }, |
43 hitCount: 300, | 42 hitCount: 300, |
44 positionTicks: [{line:55, ticks:22}], | 43 positionTicks: [{line:55, ticks:22}] |
45 children: [] | |
46 }, | 44 }, |
47 { | 45 { |
48 id: 5, | 46 id: 5, |
49 callFrame: { functionName: "baz" }, | 47 callFrame: { functionName: "baz" }, |
50 hitCount: 400, | 48 hitCount: 400, |
51 // no positionTicks for the node. | 49 // no positionTicks for the node. |
52 children: [] | 50 children: [] |
53 } | 51 } |
54 ] | 52 ] |
55 }; | 53 }; |
(...skipping 16 matching lines...) Expand all Loading... |
72 setTimeout(() => InspectorTest.completeTest(), 0); | 70 setTimeout(() => InspectorTest.completeTest(), 0); |
73 } | 71 } |
74 } | 72 } |
75 | 73 |
76 </script> | 74 </script> |
77 </head> | 75 </head> |
78 <body onload="runTest()"> | 76 <body onload="runTest()"> |
79 Tests that a line-level CPU profile is shown in the text editor. | 77 Tests that a line-level CPU profile is shown in the text editor. |
80 </body> | 78 </body> |
81 </html> | 79 </html> |
OLD | NEW |