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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js

Issue 2473283003: DevTools: add per-frame grouping into aggregated timeline details (Closed)
Patch Set: rebased Created 4 years, 1 month 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-protocol/timeline/page-frames.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var evalCallbackCallId = 3; 5 var evalCallbackCallId = 3;
6 6
7 initialize_tracingHarness = function() 7 initialize_tracingHarness = function()
8 { 8 {
9 9
10 InspectorTest.startTracing = function(callback) 10 InspectorTest.startTracing = function(callback)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (response.eof) { 103 if (response.eof) {
104 // Ignore stray callbacks from proactive read requests. 104 // Ignore stray callbacks from proactive read requests.
105 had_eof = true; 105 had_eof = true;
106 callback(result); 106 callback(result);
107 return; 107 return;
108 } 108 }
109 InspectorTest.sendCommandOrDie("IO.read", readArguments, onChunkRead); 109 InspectorTest.sendCommandOrDie("IO.read", readArguments, onChunkRead);
110 } 110 }
111 } 111 }
112 112
113 InspectorTest.findEvents = function(name, ph, condition)
114 {
115 return InspectorTest.devtoolsEvents.filter(e => e.name === name && e.ph === ph && (!condition || condition(e)));
116 }
117
113 InspectorTest.findEvent = function(name, ph, condition) 118 InspectorTest.findEvent = function(name, ph, condition)
114 { 119 {
115 for (var i = 0; i < InspectorTest.devtoolsEvents.length; i++) { 120 var events = InspectorTest.findEvents(name, ph, condition);
116 var e = InspectorTest.devtoolsEvents[i]; 121 if (events.length)
117 if (e.name === name && e.ph === ph && (!condition || condition(e))) 122 return events[0];
118 return e;
119 }
120 throw new Error("Couldn't find event " + name + " / " + ph + "\n\n in " + JS ON.stringify(InspectorTest.devtoolsEvents, null, 2)); 123 throw new Error("Couldn't find event " + name + " / " + ph + "\n\n in " + JS ON.stringify(InspectorTest.devtoolsEvents, null, 2));
121 } 124 }
122 125
123 InspectorTest.invokeAsyncWithTracing = function(functionName, callback) 126 InspectorTest.invokeAsyncWithTracing = function(functionName, callback)
124 { 127 {
125 InspectorTest.startTracing(onStart); 128 InspectorTest.startTracing(onStart);
126 129
127 function onStart() 130 function onStart()
128 { 131 {
129 InspectorTest.evaluateInPageAsync(functionName + "()").then((data) => In spectorTest.stopTracing((devtoolsEvents) => callback(devtoolsEvents, data))); 132 InspectorTest.evaluateInPageAsync(functionName + "()").then((data) => In spectorTest.stopTracing((devtoolsEvents) => callback(devtoolsEvents, data)));
130 } 133 }
131 } 134 }
132 135
133 } 136 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698