{
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() {});
+ 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();
}
}