OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function performActions() | 7 function performActions() |
8 { | 8 { |
9 window.internals.emitInspectorDidBeginFrame(); | 9 window.internals.emitInspectorDidBeginFrame(); |
10 console.timeStamp("FRAME 1"); | 10 console.timeStamp("FRAME 1"); |
11 | 11 |
12 window.internals.emitInspectorDidBeginFrame(); | 12 window.internals.emitInspectorDidBeginFrame(); |
13 window.internals.emitInspectorDidCancelFrame(); | 13 window.internals.emitInspectorDidCancelFrame(); |
14 | 14 |
15 window.internals.emitInspectorDidBeginFrame(); | 15 window.internals.emitInspectorDidBeginFrame(); |
16 console.timeStamp("FRAME 2"); | 16 console.timeStamp("FRAME 2"); |
17 window.internals.emitInspectorDidCancelFrame(); | 17 window.internals.emitInspectorDidCancelFrame(); |
18 } | 18 } |
19 | 19 |
20 function test() | 20 function test() |
21 { | 21 { |
22 function formatRecord(record) | 22 function formatRecord(record) |
23 { | 23 { |
24 if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp || | 24 if (record.type() === WebInspector.TimelineModel.RecordType.TimeStamp || |
25 record.type === WebInspector.TimelineModel.RecordType.BeginFrame) { | 25 record.type() === WebInspector.TimelineModel.RecordType.BeginFrame)
{ |
26 InspectorTest.dumpTimelineRecord(record); | 26 InspectorTest.dumpTimelineRecord(record); |
27 } | 27 } |
28 } | 28 } |
29 | 29 |
30 InspectorTest.startTimeline(function() { | 30 InspectorTest.startTimeline(function() { |
31 InspectorTest.evaluateInPage("performActions()", step2); | 31 InspectorTest.evaluateInPage("performActions()", step2); |
32 }); | 32 }); |
33 | 33 |
34 function step2() | 34 function step2() |
35 { | 35 { |
(...skipping 10 matching lines...) Expand all Loading... |
46 </script> | 46 </script> |
47 </head> | 47 </head> |
48 | 48 |
49 <body onload="runTest()"> | 49 <body onload="runTest()"> |
50 <p> | 50 <p> |
51 Tests reporting and canceling of didBeginFrame events in Timeline | 51 Tests reporting and canceling of didBeginFrame events in Timeline |
52 </p> | 52 </p> |
53 | 53 |
54 </body> | 54 </body> |
55 </html> | 55 </html> |
OLD | NEW |