Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / timeline-model.html
blobd9faee5680bae55c468371a21dcd9a8e546278a0
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()
9 var sessionId = "4.20";
10 var mainThread = 1;
11 var pid = 100;
13 var commonMetadata = [
15 "args": { "sessionId": sessionId },
16 "cat": "disabled-by-default-devtools.timeline",
17 "name": "TracingStartedInPage",
18 "ph": "I",
19 "pid": pid,
20 "tid": mainThread,
21 "ts": 100,
24 "args": { "layerTreeId": 17, "sessionId": sessionId },
25 "cat": "disabled-by-default-devtools.timeline",
26 "name": "SetLayerTreeId",
27 "ph": "I",
28 "pid": pid,
29 "tid": mainThread,
30 "ts": 101,
34 var traceEvents = [
35 {"name": "Program", "ts": 1000000, "dur": 9999, "ph": "X", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
36 {"name": "FunctionCall", "ts": 1000001, "dur": 9998, "ph": "X", args: {"data":{}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
37 {"name": "ResourceSendRequest", "ts": 1000002, "ph": "I", args: {"data":{"requestId": 1, "url": "http://example.com", "requestMethod": "GET"}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
38 {"name": "RecalculateStyles", "ts": 1001003, "dur": 997, "ph": "X", args: {data: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
39 {"name": "Layout", "ts": 1002001, "ph": "B", args: {beginData: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
40 {"name": "Layout", "ts": 1003000, "ph": "E", args: {endData: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
42 {"name": "Program", "ts": 2000000, "ph": "B", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
43 {"name": "FunctionCall", "ts": 2000001, "ph": "B", args: {"data":{}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
44 {"name": "ResourceSendRequest", "ts": 2000002, "ph": "I", args: {"data":{"requestId": 1, "url": "http://example.com", "requestMethod": "GET"}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
45 {"name": "RecalculateStyles", "ts": 2001003, "ph": "B", args: {beginData: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
46 {"name": "RecalculateStyles", "ts": 2002000, "ph": "E", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
47 {"name": "Layout", "ts": 2002101, "ph": "B", args: {beginData: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
48 {"name": "Layout", "ts": 2003001, "ph": "E", args: {endData: {}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
49 {"name": "ParseHTML", "ts": 2004000, "ph": "B", args: {"beginData": {"url": "http://example.com"}}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
50 {"name": "ParseHTML", "ts": 2004100, "ph": "E", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"},
51 {"name": "FunctionCall", "ts": 2009999, "ph": "E", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline" },
52 {"name": "Program", "ts": 2009999, "ph": "E", args: {}, "tid": mainThread, "pid": 100, "cat":"disabled-by-default.devtools.timeline"}
55 var tracingTimelineModel = InspectorTest.tracingTimelineModel();
56 tracingTimelineModel.setEventsForTest(commonMetadata.concat(traceEvents));
57 var records = tracingTimelineModel.records();
58 var topLevelRecordsCount = 2;
59 InspectorTest.assertEquals(topLevelRecordsCount, records.length);
60 for (var i = 0; i < records.length; ++i) {
61 InspectorTest.dumpTimelineModelRecord(records[i]);
63 InspectorTest.completeTest();
66 </script>
67 </head>
69 <body onload="runTest()">
70 <p>
71 Test trace-specific implementation of timeline model
72 </p>
74 </body>
75 </html>