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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing-browser-thread.html

Issue 2378843003: Timeline: fix screenshots for headless shell (Closed)
Patch Set: review comments addressed Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing-browser-thread-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
6 function test()
7 {
8 var sessionId = 1;
9
10 var testCases = {
11 "chrome": [
12 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 1, " tid": 2, "ts": 0, "args": { "name": "Renderer" } },
13 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 1, "t id": 2, "ts": 0, "args": { "name": "CrRendererMain" } },
14 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInPage", "pid": 1, "tid": 2, "ts": 100000, "tts": 606543, "args": { "sessionId": sessionId, "page": "0x4age111" } },
15 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 3, " tid": 4, "ts": 0, "args": { "name": "Browser" } },
16 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 3, "t id": 4, "ts": 0, "args": { "name": "CrBrowserMain" } },
17 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInPage", "pid": 1, "tid": 2, "ts": 100000, "tts": 606543, "args": { "sessionId": sessionId, "page": "0x4age111" } },
18 ],
19 "headless": [
20 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 1, " tid": 2, "ts": 0, "args": { "name": "Renderer" } },
21 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 1, "t id": 2, "ts": 0, "args": { "name": "CrRendererMain" } },
22 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInPage", "pid": 1, "tid": 2, "ts": 100000, "tts": 606543, "args": { "sessionId": sessionId, "page": "0x4age111" } },
23 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 3, " tid": 4, "ts": 0, "args": { "name": "HeadlessBrowser" } },
24 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 3, "t id": 4, "ts": 0, "args": { "name": "CrBrowserMain" } },
25 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInPage", "pid": 1, "tid": 2, "ts": 100000, "tts": 606543, "args": { "sessionId": sessionId, "page": "0x4age111" } },
26 ],
27 "weird-names": [
28 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 1, " tid": 2, "ts": 0, "args": { "name": "Renderer" } },
29 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 1, "t id": 2, "ts": 0, "args": { "name": "CrRendererMain" } },
30 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInPage", "pid": 1, "tid": 2, "ts": 100000, "tts": 606543, "args": { "sessionId": sessionId, "page": "0x4age111" } },
31 { "cat": "__metadata", "name": "process_name", "ph": "M", "pid": 3, " tid": 4, "ts": 0, "args": { "name": "Foo" } },
32 { "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 3, "t id": 4, "ts": 0, "args": { "name": "Bar" } },
33 { "cat": "disabled-by-default-devtools.timeline", "ph": "I", "name": "TracingStartedInBrowser", "pid": 3, "tid": 4, "ts": 100000, "tts": 606543, "arg s": { "frameTreeNodeId": 1234 } },
34 ]
35 };
36 for (var testCase of Object.keys(testCases)) {
37 var model = InspectorTest.createTracingModel();
38 model.setEventsForTest(testCases[testCase]);
39 var browserMain = WebInspector.TracingModel.browserMainThread(model);
40 if (!browserMain) {
41 InspectorTest.addResult(`${testCase} failed, no browser main thread found`);
42 continue;
43 }
44 InspectorTest.addResult(`${testCase}: main browser thread is ${browserMa in.name()} (#${browserMain.id()})`);
45 }
46 InspectorTest.completeTest();
47 }
48
49 </script>
50 </head>
51 <body onload="runTest()">
52 <p>Test that tracing model correctly finds the main browser thread in the trace.
53 </p>
54 </body>
55 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing-browser-thread-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698