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

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

Issue 247513002: Timeline: produce session cookie when timeline is started (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use IndetifiersFactory instead of directly getting processId Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/timeline-session-id-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
6 <script>
7 function test()
8 {
9 var sessionId;
10
11 // FIXME: remove BOTH lines below when tracing is out of experimental!
12 WebInspector.experimentsSettings.timelineTracingMode.enableForTest();
13 TimelineAgent.enable(WebInspector.TimelineManager.defaultTracingCategories);
14
15 WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.E ventTypes.TimelineStarted, onTimelineStarted);
16 WebInspector.timelineManager.start();
17 var tracingModel = new WebInspector.TracingModel();
18 tracingModel.start(WebInspector.TracingModel.DevToolsMetadataEventCategory + ",-*", "");
19
20 function onTimelineStarted()
21 {
22 sessionId = WebInspector.timelineManager.sessionId();
23 WebInspector.timelineManager.stop(function() { });
24 tracingModel.stop(processTracingEvents);
25 }
26
27 function processTracingEvents()
28 {
29 tracingModel.sortedProcesses().forEach(function(process) {
30 process.sortedThreads().forEach(function(thread) {
31 thread.events().forEach(processEvent);
32 });
33 });
34 InspectorTest.completeTest();
35 }
36
37 function processEvent(event)
38 {
39 if (event.category !== WebInspector.TracingModel.DevToolsMetadataEventCa tegory ||
40 Object.values(WebInspector.TracingModel.DevToolsMetadataEvent).index Of(event.name) < 0) {
41 return;
42 }
43 InspectorTest.assertEquals(sessionId, event.args["sessionId"]);
44 InspectorTest.addResult("Got DevTools metadata event: " + event.name);
45 }
46 }
47 </script>
48
49 <body onload="runTestAfterDisplay()">
50 <p style="-webkit-transform: translateZ(10px)"> <!-- Force compositing so we hav e SetLayerTreeHostId event as well -->
51 Tests that Timeline returns a session id upon a start that is matching one issue d in trace events.
52 </p>
53 </body>
54 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/timeline-session-id-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698