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

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

Issue 399043002: DevTools: switch Timeline frontend into buffered mode and remove the corresponding experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: timeline-websocket-event rebaselined Created 6 years, 5 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
Index: LayoutTests/inspector/console/console-timeline.html
diff --git a/LayoutTests/inspector/console/console-timeline.html b/LayoutTests/inspector/console/console-timeline.html
index adb67acb9a4f9e31bd550fcf3b2009eeea1ce022..93ac64dc04be27e5c0106537a6e372fb188d631b 100644
--- a/LayoutTests/inspector/console/console-timeline.html
+++ b/LayoutTests/inspector/console/console-timeline.html
@@ -77,9 +77,10 @@ function startTimeline()
function test()
{
+ WebInspector.inspectorView.showPanel("timeline");
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, eventRecorded);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, timelineStopped);
+ var panel = WebInspector.inspectorView.panel("timeline");
+ panel._model._currentTarget = WebInspector.targetManager.mainTarget();
InspectorTest.runTestSuite([
function testStartStopTimeline(next)
@@ -94,8 +95,7 @@ function test()
function testStartMultipleStopInsideEvals(next)
{
- var panel = WebInspector.inspectorView.panel("timeline");
- panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
InspectorTest.evaluateInPage("startMultiple()", step2);
@@ -108,10 +108,10 @@ function test()
{
InspectorTest.evaluateInPage("stopOne()", function() {});
}
-
- function recordingStopped()
+
+ function finish()
{
- panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
next();
}
},
@@ -123,9 +123,8 @@ function test()
function testStartFromPanel(next)
{
- var panel = WebInspector.inspectorView.panel("timeline");
panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, recordingStarted);
- panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
panel._toggleTimelineButtonClicked();
function recordingStarted()
@@ -139,17 +138,16 @@ function test()
panel._toggleTimelineButtonClicked();
}
- function recordingStopped()
+ function finish()
{
- panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
next();
}
},
function testStopFromPanel(next)
{
- var panel = WebInspector.inspectorView.panel("timeline");
- panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
InspectorTest.evaluateInPage("startTimeline()", step2);
@@ -158,59 +156,55 @@ function test()
panel._toggleTimelineButtonClicked();
}
- function recordingStopped()
+ function finish()
{
- panel._model.removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
next();
}
},
function testRacyStart(next)
{
- var panel = WebInspector.inspectorView.panel("timeline");
-
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, timelineStopped);
-
- InspectorTest.evaluateInPage("startTimeline()");
- panel._toggleTimelineButtonClicked();
-
- function timelineStarted()
- {
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- panel._toggleTimelineButtonClicked();
- }
-
- function timelineStopped()
- {
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, timelineStopped);
- setTimeout(next); // Fool listeners order so that timeline panel got this notification first.
- }
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+
+ InspectorTest.evaluateInPage("startTimeline()");
+ panel._toggleTimelineButtonClicked();
+
+ function timelineStarted()
+ {
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ panel._toggleTimelineButtonClicked();
+ }
+
+ function finish()
+ {
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ next();
+ }
},
function testRacyStart2(next)
{
- var panel = WebInspector.inspectorView.panel("timeline");
-
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, timelineStopped);
-
- panel._toggleTimelineButtonClicked();
- InspectorTest.evaluateInPage("startTimeline()");
-
- function timelineStarted()
- {
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
- // Fool listener order execution.
- setTimeout(panel._toggleTimelineButtonClicked.bind(panel));
- }
-
- function timelineStopped()
- {
- WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, timelineStopped);
- setTimeout(next); // Fool listeners order so that timeline panel got this notification first.
- }
- }
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+
+ panel._toggleTimelineButtonClicked();
+ InspectorTest.evaluateInPage("startTimeline()");
+
+ function timelineStarted()
+ {
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, timelineStarted);
+ // Fool listener order execution.
+ setTimeout(panel._toggleTimelineButtonClicked.bind(panel));
+ }
+
+ function finish()
+ {
+ WebInspector.timelineManager.removeEventListener(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, finish);
+ next();
+ }
+ }
]);
function eventRecorded(event)
@@ -225,16 +219,6 @@ function test()
}
print(event.data);
}
-
- function timelineStarted(event)
- {
- InspectorTest.addResult("Timeline started from " + (event.data ? "console." : "panel"));
- }
-
- function timelineStopped(event)
- {
- InspectorTest.addResult("Timeline stopped from " + (event.data ? "console." : "panel"));
- }
}
</script>

Powered by Google App Engine
This is Rietveld 408576698