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

Unified Diff: LayoutTests/inspector/tracing.html

Issue 212683005: Timeline Trace viewer prototype (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased, extracted model into a file of its own Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/tracing.html
diff --git a/LayoutTests/inspector/tracing.html b/LayoutTests/inspector/tracing.html
index 95ad98ca8a28e15676bd8f35adf639a0fe02b71e..a56f6f3c623e54220137c332b654df59610bb264 100644
--- a/LayoutTests/inspector/tracing.html
+++ b/LayoutTests/inspector/tracing.html
@@ -50,15 +50,22 @@ function test()
InspectorTest.addResult("Event sanity test done");
}
+ var events = [];
+ function onTraceEvents(event)
+ {
+ events = events.concat(event.data);
+ }
+
function onTracingComplete()
{
InspectorTest.addResult("Tracing complete");
- runEventsSanityCheck(WebInspector.tracingAgent.events());
+ WebInspector.tracingAgent.removeEventListener(WebInspector.TracingAgent.Events.EventsCollected, onTraceEvents);
+ runEventsSanityCheck(events);
InspectorTest.completeTest();
}
+ WebInspector.tracingAgent.addEventListener(WebInspector.TracingAgent.Events.EventsCollected, onTraceEvents);
WebInspector.tracingAgent.start("", "", onTracingStarted);
- setTimeout(InspectorTest.completeTest.bind(InspectorTest), 2000);
function onTracingStarted(error)
{
InspectorTest.addResult("Tracing started (error: " + JSON.stringify(error) + ")");
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698