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

Unified Diff: LayoutTests/inspector/console/console-timeline.html

Issue 476773002: Nuke TimelineAllEventsReceived event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | LayoutTests/inspector/console/console-timeline-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-timeline.html
diff --git a/LayoutTests/inspector/console/console-timeline.html b/LayoutTests/inspector/console/console-timeline.html
index 93ac64dc04be27e5c0106537a6e372fb188d631b..5cac295369c3df98b6c1641e8674616c5c5a8cc3 100644
--- a/LayoutTests/inspector/console/console-timeline.html
+++ b/LayoutTests/inspector/console/console-timeline.html
@@ -78,24 +78,38 @@ function startTimeline()
function test()
{
WebInspector.inspectorView.showPanel("timeline");
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, eventRecorded);
var panel = WebInspector.inspectorView.panel("timeline");
panel._model._currentTarget = WebInspector.targetManager.mainTarget();
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded, eventRecorded, this);
InspectorTest.runTestSuite([
function testStartStopTimeline(next)
{
- InspectorTest.evaluateInPage("startStopTimeline()", next);
+ InspectorTest.evaluateInPage("startStopTimeline()");
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, allEventsReceived, this);
+
+ function allEventsReceived()
+ {
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, allEventsReceived, this);
+ next();
+ }
},
function testStartStopMultiple(next)
{
- InspectorTest.evaluateInPage("startStopMultiple()", next);
+ InspectorTest.evaluateInPage("startStopMultiple()");
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, allEventsReceived, this);
+
+ function allEventsReceived()
+ {
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, allEventsReceived, this);
+ next();
+ }
},
function testStartMultipleStopInsideEvals(next)
{
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
InspectorTest.evaluateInPage("startMultiple()", step2);
@@ -111,7 +125,7 @@ function test()
function finish()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
next();
}
},
@@ -124,7 +138,7 @@ function test()
function testStartFromPanel(next)
{
panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, recordingStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
panel._toggleTimelineButtonClicked();
function recordingStarted()
@@ -140,14 +154,14 @@ function test()
function finish()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
next();
}
},
function testStopFromPanel(next)
{
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
InspectorTest.evaluateInPage("startTimeline()", step2);
@@ -158,50 +172,50 @@ function test()
function finish()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
next();
}
- },
+ },
function testRacyStart(next)
{
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, timelineStarted);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
InspectorTest.evaluateInPage("startTimeline()");
panel._toggleTimelineButtonClicked();
function timelineStarted()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStarted, timelineStarted);
panel._toggleTimelineButtonClicked();
}
function finish()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
next();
}
},
function testRacyStart2(next)
{
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, timelineStarted);
+ panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
panel._toggleTimelineButtonClicked();
InspectorTest.evaluateInPage("startTimeline()");
function timelineStarted()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStarted, timelineStarted);
// Fool listener order execution.
setTimeout(panel._toggleTimelineButtonClicked.bind(panel));
}
function finish()
{
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, finish, this);
next();
}
}
@@ -211,11 +225,11 @@ function test()
{
function print(record)
{
- if (record.type === "TimeStamp")
- InspectorTest.addResult(record.data.message);
+ if (record.type() === "TimeStamp")
+ InspectorTest.addResult(record.data().message);
- for (var i = 0; record.children && i < record.children.length; ++i)
- print(record.children[i]);
+ for (var i = 0; i < record.children().length; ++i)
+ print(record.children()[i]);
}
print(event.data);
}
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-timeline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698