OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="../../http/tests/inspector/timeline-test.js"></script> | |
5 <script> | |
6 | |
7 function performActions() | |
8 { | |
9 var iframe = document.createElement("iframe"); | |
10 iframe.src = "resources/timeline-iframe-data.html"; | |
11 document.body.appendChild(iframe); | |
12 } | |
13 | |
14 function test() | |
15 { | |
16 InspectorTest.startTimeline(step1); | |
17 function step1() | |
18 { | |
19 InspectorTest.addConsoleSniffer(step2); | |
20 InspectorTest.evaluateInPage("performActions()"); | |
21 } | |
22 | |
23 function step2() | |
24 { | |
25 InspectorTest.stopTimeline(step3); | |
26 } | |
27 | |
28 function step3() | |
29 { | |
30 function format(record) | |
31 { | |
32 if (record.type() === WebInspector.TimelineModel.RecordType.Evaluate
Script) | |
33 InspectorTest.printTimelineRecordProperties(record); | |
34 else if (record.type() === WebInspector.TimelineModel.RecordType.Par
seHTML) { | |
35 InspectorTest.dumpTimelineRecord(record, undefined, undefined, [ | |
36 "ParseHTML", | |
37 "EvaluateScript", | |
38 "EventDispatch", | |
39 "FunctionCall", | |
40 "TimeStamp", | |
41 "MarkLoad", | |
42 "MarkDOMContent" | |
43 ]); | |
44 } | |
45 } | |
46 InspectorTest.printTimelineRecords(null, format); | |
47 InspectorTest.completeTest(); | |
48 } | |
49 } | |
50 | |
51 </script> | |
52 </head> | |
53 | |
54 <body onload="runTest()"> | |
55 <p> | |
56 Tests the Timeline API instrumentation of an HTML script tag. | |
57 </p> | |
58 | |
59 </body> | |
60 </html> | |
OLD | NEW |