OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
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> | |
6 <script> | |
7 | |
8 function test() | |
9 { | |
10 var panel = WebInspector.panels.timeline; | |
11 | |
12 var callbackBarrier = new CallbackBarrier(); | |
13 InspectorTest.addSniffer(panel, "recordingStarted", recordingStarted); | |
14 InspectorTest.addSniffer(panel, "loadingComplete", callbackBarrier.createCal
lback()); | |
15 | |
16 WebInspector.ConsolePanel.show(); | |
17 InspectorTest.runWhenPageLoads(step1); | |
18 InspectorTest.addResult("Reloading page on console panel"); | |
19 panel._millisecondsToRecordAfterLoadEvent = 1; | |
20 InspectorTest.resourceTreeModel.reloadPage(); | |
21 | |
22 function step1() | |
23 { | |
24 WebInspector.TimelinePanel.show(); | |
25 InspectorTest.runWhenPageLoads(callbackBarrier.createCallback()); | |
26 callbackBarrier.callWhenDone(recordingStopped); | |
27 InspectorTest.addResult("Reloading page on timeline panel"); | |
28 InspectorTest.resourceTreeModel.reloadPage(); | |
29 } | |
30 | |
31 function recordingStarted() | |
32 { | |
33 InspectorTest.addResult("Recording started"); | |
34 InspectorTest.addResult("Initiated by user: " + !panel._autoRecordGenera
tion); | |
35 } | |
36 | |
37 function recordingStopped() | |
38 { | |
39 InspectorTest.addResult("Recording stopped"); | |
40 InspectorTest.completeTest(); | |
41 } | |
42 } | |
43 | |
44 </script> | |
45 </head> | |
46 | |
47 <body onload="runTest()"> | |
48 <p>Test auto-recording of Timeline.</p> | |
49 | |
50 </body> | |
51 </html> | |
OLD | NEW |