Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / trace-event-self-time.html
blob4720242317b1c4fa9993102be47b91dfcd5ad765
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../tracing-test.js"></script>
5 <script>
6 function test()
8 var sessionId = "6.23";
9 var rawTraceEvents = [
11 "args": {
12 "name": "Renderer"
14 "cat": "__metadata",
15 "name": "process_name",
16 "ph": "M",
17 "pid": 17851,
18 "tid": 23,
19 "ts": 0
22 "args": {
23 "name": "CrRendererMain"
25 "cat": "__metadata",
26 "name": "thread_name",
27 "ph": "M",
28 "pid": 17851,
29 "tid": 23,
30 "ts": 0
33 "args": {
34 "sessionId": sessionId,
35 "page": "0x4age111"
37 "cat": "disabled-by-default-devtools.timeline",
38 "name": "TracingStartedInPage",
39 "ph": "I",
40 "pid": 17851,
41 "tid": 23,
42 "ts": 100000,
43 "tts": 606543
46 "args": {},
47 "cat": "disabled-by-default-devtools.timeline",
48 "name": "Program",
49 "ph": "B",
50 "pid": 17851,
51 "tid": 23,
52 "ts": 200000,
53 "tts": 5612442
56 "args": {
57 "data": {
58 "frame": "0x2f7b63884000"
61 "cat": "disabled-by-default-devtools.timeline",
62 "name": "InvalidateLayout",
63 "ph": "I",
64 "pid": 17851,
65 "tid": 23,
66 "ts": 210000,
67 "tts": 5612442
70 "args": {
71 "beginData": {
72 "dirtyObjects": 10,
73 "frame": "0x2f7b63884000",
74 "partialLayout": true,
75 "totalObjects": 179
78 "cat": "disabled-by-default-devtools.timeline",
79 "name": "Layout",
80 "ph": "B",
81 "pid": 17851,
82 "tid": 23,
83 "ts": 220000,
84 "tts": 1758056
87 "args": {
88 "endData": {
89 "root": [
91 286,
92 1681,
93 286,
94 1681,
95 1371,
97 1371
99 "rootNode": 9
102 "cat": "disabled-by-default-devtools.timeline",
103 "name": "Layout",
104 "ph": "E",
105 "pid": 17851,
106 "tid": 23,
107 "ts": 270000,
108 "tts": 1758430
111 "args": {},
112 "cat": "disabled-by-default-devtools.timeline",
113 "name": "Program",
114 "ph": "E",
115 "pid": 17851,
116 "tid": 23,
117 "ts": 300000,
118 "tts": 5612451
121 "args": {},
122 "cat": "disabled-by-default-devtools.timeline",
123 "name": "Program",
124 "ph": "B",
125 "pid": 17851,
126 "tid": 23,
127 "ts": 400000,
128 "tts": 5612504
131 "args": {
132 "type": "blur"
134 "cat": "disabled-by-default-devtools.timeline",
135 "dur": 60000,
136 "name": "EventDispatch",
137 "ph": "X",
138 "pid": 17851,
139 "tdur": 60,
140 "tid": 23,
141 "ts": 410000,
142 "tts": 1769084
145 "args": {
146 "data": {
147 "frame": "0x2f7b63884000",
148 "scriptId": "52",
149 "scriptLine": 539,
150 "scriptName": "chrome-devtools://devtools/bundled/ui/UIUtils.js"
153 "cat": "disabled-by-default-devtools.timeline",
154 "dur": 10000,
155 "name": "FunctionCall",
156 "ph": "X",
157 "pid": 17851,
158 "tdur": 74,
159 "tid": 23,
160 "ts": 420000,
161 "tts": 1769136
164 "args": {
165 "data": {
166 "frame": "0x2f7b63884000",
167 "scriptId": "52",
168 "scriptLine": 539,
169 "scriptName": "chrome-devtools://devtools/bundled/ui/UIUtils.js"
172 "cat": "disabled-by-default-devtools.timeline",
173 "dur": 10000,
174 "name": "FunctionCall",
175 "ph": "X",
176 "pid": 17851,
177 "tdur": 74,
178 "tid": 23,
179 "ts": 440000,
180 "tts": 1769136
183 "args": {},
184 "cat": "disabled-by-default-devtools.timeline",
185 "name": "Animation",
186 "ph": "b",
187 "pid": 17851,
188 "tid": 23,
189 "ts": 445000,
192 "args": {
193 "data": {
194 "page": "0x4age222"
197 "cat": "disabled-by-default-devtools.timeline",
198 "name": "CommitLoad",
199 "ph": "X",
200 "dur": 1000,
201 "pid": 17851,
202 "tid": 23,
203 "ts": 446000,
206 "args": {},
207 "cat": "webkit.console",
208 "name": "timestamp",
209 "ph": "S",
210 "pid": 17851,
211 "tid": 23,
212 "ts": 450000,
215 "args": {},
216 "cat": "disabled-by-default-devtools.timeline",
217 "name": "Program",
218 "ph": "E",
219 "pid": 17851,
220 "tid": 23,
221 "ts": 500000,
222 "tts": 5612506
225 "args": {},
226 "cat": "disabled-by-default-devtools.timeline",
227 "name": "Program",
228 "ph": "B",
229 "pid": 17851,
230 "tid": 23,
231 "ts": 1200000,
234 "args": {},
235 "cat": "disabled-by-default-devtools.timeline",
236 "name": "Animation",
237 "ph": "e",
238 "pid": 17851,
239 "tid": 23,
240 "ts": 1245000,
243 "args": {},
244 "cat": "webkit.console",
245 "name": "timestamp",
246 "ph": "F",
247 "pid": 17851,
248 "tid": 23,
249 "ts": 1345000,
252 "args": {},
253 "cat": "disabled-by-default-devtools.timeline",
254 "name": "Program",
255 "ph": "E",
256 "pid": 17851,
257 "tid": 23,
258 "ts": 1500000,
262 var cpuProfile = {
263 startTime: 420,
264 endTime: 430,
265 head: {
266 functionName: "(root)",
267 id: 1,
268 children: [{
269 functionName: "foo",
270 id: 2,
271 children: [{
272 functionName: "bar",
273 id: 3,
274 children: []
277 functionName: "baz",
278 id: 4,
279 children: []
283 timestamps: [421000, 422000, 423000, 424000, 425000, 426000, 427000, 428000, 429000],
284 samples: [2, 2, 3, 3, 3, 4, 4, 2, 2 ]
287 var tracingTimelineModel = InspectorTest.tracingTimelineModel();
288 tracingTimelineModel._addCpuProfile(WebInspector.targetManager.mainTarget().id(), cpuProfile);
289 tracingTimelineModel.setEventsForTest(rawTraceEvents);
290 var events = tracingTimelineModel.inspectedTargetEvents();
291 InspectorTest.assertEquals(24, events.length);
292 events.forEach(function(e) {
293 InspectorTest.addResult(e.name + ": " + e.startTime + " " + (e.selfTime || 0).toFixed(2) + "/" + (e.duration || 0).toFixed(2));
295 InspectorTest.completeTest();
298 </script>
299 </head>
300 <body onload="runTest()">
301 </body>
302 </html>