3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
9 var panel = WebInspector.inspectorView.panel("timeline");
10 var model = panel._model;
12 var callbackBarrier = new CallbackBarrier();
13 model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, recordingStarted);
14 model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, callbackBarrier.createCallback());
16 WebInspector.inspectorView.showPanel("console");
17 InspectorTest.runWhenPageLoads(step1);
18 InspectorTest.addResult("Reloading page on console panel");
19 WebInspector.resourceTreeModel.reloadPage();
23 WebInspector.inspectorView.showPanel("timeline");
24 InspectorTest.runWhenPageLoads(callbackBarrier.createCallback());
25 callbackBarrier.callWhenDone(recordingStopped);
26 InspectorTest.addResult("Reloading page on timeline panel");
27 WebInspector.resourceTreeModel.reloadPage();
30 function recordingStarted()
32 InspectorTest.addResult("Recording started");
33 InspectorTest.addResult("Initiated by user: " + panel._userInitiatedRecording);
36 function recordingStopped()
38 InspectorTest.addResult("Recording stopped");
39 InspectorTest.completeTest();
46 <body onload="runTest()">
47 <p>Test auto-recording of Timeline.</p>