Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-js-line-level-profile.html

Issue 2248963007: DevTools: Make children field of the CpuProfileNode optional in the protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698