Index: LayoutTests/inspector/timeline/timeline-auto-record.html |
diff --git a/LayoutTests/inspector/timeline/timeline-auto-record.html b/LayoutTests/inspector/timeline/timeline-auto-record.html |
index 2d9f8a53e03990d0d3d2fed00f84be723c28bb1c..6140c1fd34b2234ac72ba810f490d751d1dd76e3 100644 |
--- a/LayoutTests/inspector/timeline/timeline-auto-record.html |
+++ b/LayoutTests/inspector/timeline/timeline-auto-record.html |
@@ -8,27 +8,33 @@ function test() |
{ |
var panel = WebInspector.inspectorView.panel("timeline"); |
var model = panel._model; |
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline is being recorded"); |
- InspectorTest.assertTrue(!model.records().length, "timeline has already been recorded"); |
+ |
+ model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, recordingStarted); |
+ model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped); |
WebInspector.inspectorView.showPanel("console"); |
InspectorTest.runWhenPageLoads(step1); |
+ InspectorTest.addResult("Reloading page on console panel"); |
WebInspector.resourceTreeModel.reloadPage(); |
+ |
function step1() |
{ |
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline started recording"); |
- InspectorTest.assertTrue(!model.records().length, "timeline has been recorded"); |
- |
WebInspector.inspectorView.showPanel("timeline"); |
- InspectorTest.runWhenPageLoads(step2); |
+ InspectorTest.runWhenPageLoads(function() {}); |
apavlov
2014/04/02 11:32:34
InspectorTest.reloadPage() ?
|
+ InspectorTest.addResult("Reloading page on timeline panel"); |
WebInspector.resourceTreeModel.reloadPage(); |
} |
- function step2() |
+ function recordingStarted() |
+ { |
+ InspectorTest.addResult("Recording started"); |
+ InspectorTest.addResult("Initiated by user: " + model._clientInitiatedRecording); |
+ } |
+ |
+ function recordingStopped() |
{ |
- InspectorTest.assertTrue(model.records().length, "timeline should have been recorded"); |
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline recording should have finished"); |
+ InspectorTest.addResult("Recording stopped"); |
InspectorTest.completeTest(); |
} |
} |