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

Side by Side Diff: LayoutTests/inspector/tracing/timeline-dfs.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 type="text/javascript">
6
7 var test = function()
8 {
9 WebInspector.inspectorView.showPanel("timeline");
10
11 function dumper(record)
12 {
13 InspectorTest.addResult(record.type());
14 }
15
16 var sessionId = "4.20";
17 var mainThread = 1;
18 var pid = 100;
19
20 var testData = [
21 {
22 "args": { "sessionId": sessionId },
23 "cat": "disabled-by-default-devtools.timeline",
24 "name": "TracingStartedInPage",
25 "ph": "I",
26 "pid": pid,
27 "tid": mainThread,
28 "ts": 100,
29 },
30 {"name": "a", "ts": 1000000, "ph": "B", "tid": mainThread, "pid": pid, " cat":"disabled-by-default.devtools.timeline", "args": {}},
31 {"name": "aa", "ts": 1000001, "ph": "B", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args":{}},
32 {"name": "aaa", "ts": 1200000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
33 {"name": "aab", "ts": 1300000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
34 {"name": "aa", "ts": 1400000, "ph": "E", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args": {}},
35 {"name": "ab", "ts": 1500001, "ph": "B", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args":{}},
36 {"name": "aba", "ts": 1600000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
37 {"name": "abb", "ts": 1700000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
38 {"name": "ab", "ts": 1800000, "ph": "E", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args": {}},
39 {"name": "a", "ts": 2000000, "ph": "E", "tid": mainThread, "pid": pid, " cat":"disabled-by-default.devtools.timeline", "args": {}},
40 {"name": "b", "ts": 3000000, "ph": "B", "tid": mainThread, "pid": pid, " cat":"disabled-by-default.devtools.timeline", "args": {}},
41 {"name": "ba", "ts": 3000001, "ph": "B", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args":{}},
42 {"name": "baa", "ts": 3200000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
43 {"name": "bab", "ts": 3300000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
44 {"name": "ba", "ts": 3400000, "ph": "E", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args": {}},
45 {"name": "bb", "ts": 3500001, "ph": "B", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args":{}},
46 {"name": "bba", "ts": 3600000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
47 {"name": "bbb", "ts": 3700000, "ph": "I", "tid": mainThread, "pi d": pid, "cat":"disabled-by-default.devtools.timeline", "args":{}},
48 {"name": "bb", "ts": 3800000, "ph": "E", "tid": mainThread, "pid": p id, "cat":"disabled-by-default.devtools.timeline", "args": {}},
49 {"name": "b", "ts": 4000000, "ph": "E", "tid": mainThread, "pid": pid, " cat":"disabled-by-default.devtools.timeline", "args": {}}
50 ];
51
52 // Reset filter to accept all records.
53 InspectorTest.timelineModel()._recordFilter = new WebInspector.TimelineModel .Filter();
54 InspectorTest.timelineModel().setEventsForTest(sessionId, testData);
55
56 InspectorTest.addResult("DFS preorder:");
57 InspectorTest.timelineModel().forAllRecords(dumper);
58 InspectorTest.addResult("");
59
60 InspectorTest.addResult("DFS postorder:");
61 InspectorTest.timelineModel().forAllRecords(null, dumper);
62 InspectorTest.completeTest();
63 }
64
65 </script>
66 </head>
67 <body onload="runTest()">
68 <p>Tests TimelineModel.forAllRecords function.</p>
69 </body>
70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698