3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/console-test.js"></script>
5 <script src=
"../../http/tests/inspector/timeline-test.js"></script>
10 var panel
= WebInspector
.panels
.timeline
;
11 var model
= panel
._model
;
13 var callbackBarrier
= new CallbackBarrier();
14 model
.addEventListener(WebInspector
.TimelineModel
.Events
.RecordingStarted
, recordingStarted
);
15 model
.addEventListener(WebInspector
.TimelineModel
.Events
.RecordingStopped
, callbackBarrier
.createCallback());
17 WebInspector
.ConsolePanel
.show();
18 InspectorTest
.runWhenPageLoads(step1
);
19 InspectorTest
.addResult("Reloading page on console panel");
20 panel
._millisecondsToRecordAfterLoadEvent
= 1;
21 InspectorTest
.resourceTreeModel
.reloadPage();
25 WebInspector
.TimelinePanel
.show();
26 InspectorTest
.runWhenPageLoads(callbackBarrier
.createCallback());
27 callbackBarrier
.callWhenDone(recordingStopped
);
28 InspectorTest
.addResult("Reloading page on timeline panel");
29 InspectorTest
.resourceTreeModel
.reloadPage();
32 function recordingStarted()
34 InspectorTest
.addResult("Recording started");
35 InspectorTest
.addResult("Initiated by user: " + !panel
._autoRecordGeneration
);
38 function recordingStopped()
40 InspectorTest
.addResult("Recording stopped");
41 InspectorTest
.completeTest();
48 <body onload=
"runTest()">
49 <p>Test auto-recording of Timeline.
</p>