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

Side by Side Diff: LayoutTests/inspector/timeline/tracing/frame-model.html

Issue 477153005: DevTools: adopt existing Timeline tests for tracing based Timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/timeline-test.js"></script>
5 <script src="../../tracing-test.js"></script>
6 <script>
7 function test()
8 {
9 var sessionId = "4.20";
10 var mainThread = 1;
11 var implThread = 2;
12 var rasterThread = 3;
13 var pid = 100;
14
15 var commonMetadata = [
16 {
17 "args": { "sessionId": sessionId },
18 "cat": "disabled-by-default-devtools.timeline",
19 "name": "TracingStartedInPage",
20 "ph": "I",
21 "pid": pid,
22 "tid": mainThread,
23 "ts": 100,
24 },
25 {
26 "args": { "layerTreeId": 17 },
27 "cat": "disabled-by-default-devtools.timeline",
28 "name": "SetLayerTreeId",
29 "ph": "I",
30 "pid": pid,
31 "tid": mainThread,
32 "ts": 101,
33 }
34 ];
35
36 var testData = {
37 "main thread only": [
38 {"name": "Program", "ts": 1000000, args: {}, "dur": 3999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
39 {"name": "BeginMainThreadFrame", "ts": 1000001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
40 {"name": "FunctionCall", "ts": 1000002, args: {}, "dur": 3997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
41
42 {"name": "Program", "ts": 1016000, args: {}, "dur": 10999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
43 {"name": "BeginMainThreadFrame", "ts": 1016001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
44 {"name": "FunctionCall", "ts": 1016002, args: {}, "dur": 2997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
45 {"name": "StyleRecalculate", "ts": 1019000, args: {}, "dur": 1999, " ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
46 {"name": "Layout", "ts": 1021000, args: { "beginData": { "frame": 0x 12345678 }, "endData": { "rootNode": 1} }, "dur": 5999, "ph": "X", "tid": mainTh read, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
47
48 {"name": "Program", "ts": 1032000, args: {}, "dur": 1999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
49 {"name": "BeginMainThreadFrame", "ts": 1032001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
50
51 {"name": "Program", "ts": 1048000, args: {}, "dur": 1999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
52 {"name": "BeginMainThreadFrame", "ts": 1048001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
53 ],
54 "impl-side only": [
55 {"name": "BeginFrame", "ts": 1000000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
56 {"name": "BeginFrame", "ts": 1016000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
57 {"name": "DrawFrame", "ts": 1030000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
58 {"name": "BeginFrame", "ts": 1032000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
59 {"name": "DrawFrame", "ts": 1046000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
60 {"name": "BeginFrame", "ts": 1048000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
61 {"name": "BeginFrame", "ts": 1064000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
62 {"name": "RasterTask", "ts": 1065001, args: {}, "ph": "X", "dur": 99 9, "tid": rasterThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline " },
63 {"name": "RasterTask", "ts": 1066001, args: {}, "ph": "X", "dur": 99 9, "tid": rasterThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline " },
64 {"name": "RasterTask", "ts": 1067001, args: {}, "ph": "X", "dur": 99 9, "tid": rasterThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline " },
65 {"name": "DrawFrame", "ts": 1078000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
66 {"name": "BeginFrame", "ts": 1080000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
67 {"name": "DrawFrame", "ts": 1081000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
68 {"name": "Program", "ts": 10820000, args: {}, "dur": 100, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
69 ],
70 "impl-side with commits": [
71 {"name": "BeginFrame", "ts": 1000000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
72 {"name": "RequestMainThreadFrame", "ts": 1000001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
73 {"name": "DrawFrame", "ts": 1014000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
74 {"name": "BeginFrame", "ts": 1016000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
75 {"name": "DrawFrame", "ts": 1030000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
76 {"name": "BeginFrame", "ts": 1032000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
77
78 {"name": "Program", "ts": 1001000, args: {}, "dur": 32999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
79 {"name": "BeginMainThreadFrame", "ts": 1001001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
80 {"name": "FunctionCall", "ts": 1001002, args: {}, "dur": 17997, "ph" : "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeli ne" },
81 {"name": "StyleRecalculate", "ts": 1019000, args: {}, "dur": 1999, " ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
82 {"name": "Layout", "ts": 1021000, args: { "beginData": { "frame": 0x 12345678 }, "endData": { "rootNode": 1} }, "dur": 11999, "ph": "X", "tid": mainT hread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
83 {"name": "CompositeLayers", "ts": 1032000, args: { "layerTreeId": 17 }, "dur": 1999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-de fault.devtools.timeline" },
84
85 {"name": "Program", "ts": 1034000, args: {}, "dur": 5999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
86 {"name": "FunctionCall", "ts": 1034002, args: {}, "dur": 5997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
87
88 {"name": "ActivateLayerTree", "ts": 1045001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
89 {"name": "DrawFrame", "ts": 1046000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
90 {"name": "BeginFrame", "ts": 1048001, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
91 {"name": "ActivateLayerTree", "ts": 1060001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
92 {"name": "DrawFrame", "ts": 1062000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
93
94 {"name": "Program", "ts": 1049000, args: {}, "dur": 11999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
95 {"name": "BeginMainThreadFrame", "ts": 1049001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
96 {"name": "CompositeLayers", "ts": 1050002, args: { "layerTreeId": 17 }, "dur": 10.997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by- default.devtools.timeline" },
97
98 {"name": "BeginFrame", "ts": 1064000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
99 {"name": "RequestMainThreadFrame", "ts": 1064001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
100
101 {"name": "Program", "ts": 1065000, args: {}, "dur": 13999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
102 {"name": "BeginMainThreadFrame", "ts": 1065001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
103 ],
104
105 "impl-side with interleaving commits": [
106 {"name": "BeginFrame", "ts": 1000000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
107 {"name": "RequestMainThreadFrame", "ts": 1000001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
108 {"name": "ActivateLayerTree", "ts": 1014000, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
109 {"name": "DrawFrame", "ts": 1014001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
110
111 {"name": "Program", "ts": 1001000, args: {}, "dur": 12999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
112 {"name": "BeginMainThreadFrame", "ts": 1001001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
113 {"name": "CompositeLayers", "ts": 1001002, args: { "layerTreeId": 17 }, "dur": 12.997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by- default.devtools.timeline" },
114
115 {"name": "BeginFrame", "ts": 1016000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
116 {"name": "RequestMainThreadFrame", "ts": 1016001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
117 {"name": "ActivateLayerTree", "ts": 1030000, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
118 {"name": "DrawFrame", "ts": 1030001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
119
120 {"name": "Program", "ts": 1017000, args: {}, "dur": 12999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
121 {"name": "BeginMainThreadFrame", "ts": 1017001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
122 {"name": "FunctionCall", "ts": 1017002, args: {}, "dur": 8997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
123 {"name": "CompositeLayers", "ts": 1026000, args: { "layerTreeId": 17 }, "dur": 3999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-de fault.devtools.timeline" },
124
125 {"name": "BeginFrame", "ts": 1032000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
126 {"name": "RequestMainThreadFrame", "ts": 1032001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
127 {"name": "ActivateLayerTree", "ts": 1046000, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
128 {"name": "DrawFrame", "ts": 1046001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
129
130 {"name": "Program", "ts": 1033000, args: {}, "dur": 12999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
131 {"name": "BeginMainThreadFrame", "ts": 1033001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
132 {"name": "CompositeLayers", "ts": 1033002, args: { "layerTreeId": 17 }, "dur": 7999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-de fault.devtools.timeline" },
133 {"name": "FunctionCall", "ts": 1041002, args: {}, "dur": 4997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
134
135 {"name": "BeginFrame", "ts": 1048000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
136 {"name": "Program", "ts": 1049000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
137 ],
138 "pre-frame time accounting": [
139 {"name": "Program", "ts": 1000000, args: {}, "dur": 29999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
140 {"name": "FunctionCall", "ts": 1000002, args: {}, "dur": 28997, "ph" : "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeli ne" },
141 {"name": "ScheduleStyleRecalculation", "ts": 1001001, args: {}, "ph" : "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeli ne" },
142
143 {"name": "BeginFrame", "ts": 1032000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
144 {"name": "RequestMainThreadFrame", "ts": 1032001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
145 {"name": "ActivateLayerTree", "ts": 1034001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
146 {"name": "DrawFrame", "ts": 1035001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
147
148 {"name": "Program", "ts": 1033000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
149 {"name": "BeginMainThreadFrame", "ts": 1033001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
150 {"name": "RecalculateStyles", "ts": 1033002, args: { "layerTreeId": 17 }, "dur": 1398, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by- default.devtools.timeline" },
151 {"name": "CompositeLayers", "ts": 1033401, args: { "layerTreeId": 17 }, "dur": 598, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-def ault.devtools.timeline" },
152
153 {"name": "BeginFrame", "ts": 1048000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
154
155 {"name": "Program", "ts": 1050000, args: {}, "dur": 14999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
156 {"name": "FunctionCall", "ts": 1050002, args: {}, "dur": 8997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timelin e" },
157 {"name": "InvalidateLayout", "ts": 1059000, args: {}, "ph": "I", "ti d": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
158
159 {"name": "DrawFrame", "ts": 1063001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
160 {"name": "BeginFrame", "ts": 1064000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
161 {"name": "RequestMainThreadFrame", "ts": 1064001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
162 {"name": "ActivateLayerTree", "ts": 1071001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
163 {"name": "DrawFrame", "ts": 1071002, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
164
165 {"name": "Program", "ts": 1065000, args: {}, "dur": 5999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
166 {"name": "BeginMainThreadFrame", "ts": 1065001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
167 {"name": "Layout", "ts": 1065002, args: { "beginData": { "frame": 0x 12345678 }, "endData": { "rootNode": 1} }, "dur": 2998, "ph": "X", "tid": mainTh read, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
168 {"name": "CompositeLayers", "ts": 1068001, args: { "layerTreeId": 17 }, "dur": 2998, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-de fault.devtools.timeline" },
169
170 {"name": "BeginFrame", "ts": 1080000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
171 {"name": "RequestMainThreadFrame", "ts": 1080001, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
172 {"name": "ActivateLayerTree", "ts": 1081001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
173 {"name": "DrawFrame", "ts": 1081002, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
174
175 {"name": "Program", "ts": 1073000, args: {}, "dur": 7999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
176 {"name": "ScrollLayer", "ts": 1073002, args: { "data": { "nodeId": 1 } }, "dur": 2998, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by- default.devtools.timeline" },
177
178 {"name": "BeginFrame", "ts": 1096000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
179 {"name": "ActivateLayerTree", "ts": 1096001, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
180 {"name": "DrawFrame", "ts": 1096002, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
181
182 {"name": "Program", "ts": 1081000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
183 {"name": "BeginMainThreadFrame", "ts": 1081001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
184 {"name": "CompositeLayers", "ts": 1081001, args: { "layerTreeId": 17 }, "dur": 998, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-def ault.devtools.timeline" },
185 ],
186 "record processing order": [
187 {"name": "DrawFrame", "ts": 1000000, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
188 {"name": "BeginFrame", "ts": 1000001, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
189 {"name": "RequestMainThreadFrame", "ts": 1000002, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
190 {"name": "ActivateLayerTree", "ts": 1013002, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
191 {"name": "DrawFrame", "ts": 1013005, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
192 {"name": "BeginFrame", "ts": 1016000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
193
194 {"name": "Program", "ts": 1001000, args: {}, "dur": 15999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
195 {"name": "BeginMainThreadFrame", "ts": 1001001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
196 {"name": "FunctionCall", "ts": 1001002, args: {}, "dur": 11997, "ph" : "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeli ne" },
197 {"name": "CompositeLayers", "ts": 1013002, args: { "layerTreeId": 17 }, "dur": 3997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-de fault.devtools.timeline" },
198
199 {"name": "ActivateLayerTree", "ts": 1030000, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
200 {"name": "DrawFrame", "ts": 1030001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
201 {"name": "BeginFrame", "ts": 1031000, args: { "layerTreeId": 17 }, " ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.tim eline" },
202 {"name": "RequestMainThreadFrame", "ts": 1031002, args: { "layerTree Id": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default. devtools.timeline" },
203 {"name": "ActivateLayerTree", "ts": 1061000, args: { "layerTreeId": 17 }, "ph": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devto ols.timeline" },
204 {"name": "DrawFrame", "ts": 1062001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
205
206 {"name": "Program", "ts": 1032000, args: {}, "dur": 31999, "ph": "X" , "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" } ,
207 {"name": "BeginMainThreadFrame", "ts": 1032001, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
208 {"name": "FunctionCall", "ts": 1032002, args: {}, "dur": 10997, "ph" : "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeli ne" },
209 {"name": "CompositeLayers", "ts": 1043002, args: { "layerTreeId": 17 }, "dur": 19997, "ph": "X", "tid": mainThread, "pid": 100, "cat":"disabled-by-d efault.devtools.timeline" },
210
211 {"name": "DrawFrame", "ts": 1080001, args: { "layerTreeId": 17 }, "p h": "I", "tid": implThread, "pid": 100, "cat":"disabled-by-default.devtools.time line" },
212 ]
213 };
214
215 var frameModel = new WebInspector.TracingTimelineFrameModel(WebInspector.tar getManager.mainTarget());
216
217 function loadEvents(events)
218 {
219 var tracingTimelineModel = InspectorTest.tracingTimelineModel;
220 tracingTimelineModel.setEventsForTest(sessionId, events);
221 frameModel.reset();
222 frameModel.addTraceEvents(tracingTimelineModel.inspectedTargetEvents());
223 }
224
225 for (var testName in testData) {
226 var data = testData[testName];
227 loadEvents(commonMetadata.concat(data))
228 InspectorTest.addResult("Test: " + testName);
229 frameModel.frames().forEach(InspectorTest.dumpFrame, InspectorTest);
230 }
231 InspectorTest.completeTest();
232 }
233
234 </script>
235 </head>
236
237 <body onload="runTest()">
238 <p>
239 Test the frames are correctly built based on trace events
240 </p>
241
242 </body>
243 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698