Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing-model.html
blob60c46ad4373052b8a4d73bedc94ebf11bf9a9cf6
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 mainThread = 1;
9 var pid = 100;
11 var testData = [
12 {"name": "Outer", "ts": 10000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
13 {"name": "Inner", "ts": 10000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
15 {"name": "Outer", "ts": 20000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
16 {"name": "Inner", "ts": 20000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
18 {"name": "Outer", "ts": 30000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
19 {"name": "Inner", "ts": 30000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
21 {"name": "Outer", "ts": 40000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
22 {"name": "Inner", "ts": 40000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
23 {"name": "Outer", "ts": 41000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
25 {"name": "Outer", "ts": 50000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
26 {"name": "Inner", "ts": 50000, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
27 {"name": "Outer", "ts": 51000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
29 {"name": "Outer", "ts": 60000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
30 {"name": "Inner", "ts": 60001, args: {}, "dur": 999, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
31 {"name": "Outer", "ts": 61000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
33 {"name": "Outer", "ts": 70000, args: {}, "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
34 {"name": "Inner", "ts": 70000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
35 {"name": "Inner", "ts": 71000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
37 {"name": "Outer", "ts": 80000, args: {}, "dur": 0, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
38 {"name": "Other", "ts": 80000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
39 {"name": "Other", "ts": 80000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
41 {"name": "Outer", "ts": 90000, args: {}, "ph": "B", "tid": mainThread, "pid": 100, "cat":"test" },
42 {"name": "Inner", "ts": 90000, args: {}, "ph": "X", "dur": 0, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
43 {"name": "Outer", "ts": 90000, args: {}, "ph": "E", "tid": mainThread, "pid": 100, "cat":"test" },
45 {"name": "Outer", "ts": 100000, args: {}, "ph": "X", "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
46 {"name": "Inner", "ts": 100000, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"test" },
48 {"name": "Outer", "ts": 110000, args: {}, "ph": "X", "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
49 {"name": "Other", "ts": 111000, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"test" },
51 {"name": "Outer", "ts": 120000, args: {}, "ph": "X", "dur": 1000, "ph": "X", "tid": mainThread, "pid": 100, "cat":"test" },
52 {"name": "Inner", "ts": 120999, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"test" },
54 {"name": "Outer", "ts": 130000, args: {}, "ph": "I", "tid": mainThread, "pid": 100, "cat":"test" }
57 var model = InspectorTest.createTracingModel();
58 model.setEventsForTest(testData);
59 var events = model.sortedProcesses()[0].threadById(mainThread).events();
60 for (var i = 0; i < events.length; ++i) {
61 var event = events[i];
62 InspectorTest.addResult(event.phase + " " + event.name + " " + event.startTime + " - " + event.endTime);
64 InspectorTest.completeTest();
67 </script>
68 </head>
69 <body onload="runTest()">
70 <p>Test that tracing model correctly processes trace events.
71 </p>
72 </body>
73 </html>