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

Side by Side Diff: LayoutTests/inspector/tracing-session-id.html

Issue 301593002: DevTools: process events from all threads in TimelineTraceEventBindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed Created 6 years, 6 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="tracing-test.js"></script> 4 <script src="tracing-test.js"></script>
5 5
6 <script> 6 <script>
7 function test() 7 function test()
8 { 8 {
9 WebInspector.inspectorView.showPanel("timeline");
9 InspectorTest.invokeWithTracing("-*," + WebInspector.TracingModel.DevToolsMe tadataEventCategory, "(function(callback) { callback(); })", processTracingEvent s); 10 InspectorTest.invokeWithTracing("-*," + WebInspector.TracingModel.DevToolsMe tadataEventCategory, "(function(callback) { callback(); })", processTracingEvent s);
10 11
11 function processTracingEvents() 12 function processTracingEvents()
12 { 13 {
13 InspectorTest.tracingModel.sortedProcesses().forEach(function(process) { 14 InspectorTest.tracingModel.sortedProcesses().forEach(function(process) {
14 process.sortedThreads().forEach(function(thread) { 15 process.sortedThreads().forEach(function(thread) {
15 thread.events().forEach(processEvent); 16 thread.events().forEach(processEvent);
16 }); 17 });
17 }); 18 });
18 InspectorTest.completeTest(); 19 InspectorTest.completeTest();
19 } 20 }
20 21
21 function processEvent(event) 22 function processEvent(event)
22 { 23 {
23 if (event.category !== WebInspector.TracingModel.DevToolsMetadataEventCa tegory || 24 var metadataEvents = [
24 Object.values(WebInspector.TracingModel.DevToolsMetadataEvent).index Of(event.name) < 0) { 25 WebInspector.TimelineTraceEventBindings.RecordType.SetLayerTreeId,
26 WebInspector.TimelineTraceEventBindings.RecordType.TracingStartedInP age
27 ];
28
29 if (event.category !== WebInspector.TracingModel.DevToolsMetadataEventCa tegory || metadataEvents.indexOf(event.name) < 0)
25 return; 30 return;
26 } 31
27 InspectorTest.assertEquals(InspectorTest.tracingModel.sessionId(), event .args["sessionId"]); 32 InspectorTest.assertEquals(InspectorTest.tracingModel.sessionId(), event .args["sessionId"]);
28 InspectorTest.addResult("Got DevTools metadata event: " + event.name); 33 InspectorTest.addResult("Got DevTools metadata event: " + event.name);
29 } 34 }
30 } 35 }
31 </script> 36 </script>
32 37
33 <body onload="runTestAfterDisplay()"> 38 <body onload="runTestAfterDisplay()">
34 <p style="-webkit-transform: translateZ(10px)"> <!-- Force compositing so we hav e SetLayerTreeHostId event as well --> 39 <p style="-webkit-transform: translateZ(10px)"> <!-- Force compositing so we hav e SetLayerTreeHostId event as well -->
35 Tests that Tracing agent returns a session id upon a start that is matching one issued in trace events. 40 Tests that Tracing agent returns a session id upon a start that is matching one issued in trace events.
36 </p> 41 </p>
37 </body> 42 </body>
38 </html> 43 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/trace-event-self-time.html ('k') | Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698