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 var scriptUrl = "timeline-network-resource.js"; | 7 var scriptUrl = "timeline-network-resource.js"; |
8 | 8 |
9 function performActions() | 9 function performActions() |
10 { | 10 { |
(...skipping 28 matching lines...) Expand all Loading... |
39 var lastRecordStartTime; | 39 var lastRecordStartTime; |
40 function format(record) | 40 function format(record) |
41 { | 41 { |
42 if (record.type() === WebInspector.TimelineModel.RecordType.Resource
SendRequest) | 42 if (record.type() === WebInspector.TimelineModel.RecordType.Resource
SendRequest) |
43 printSend(record._record); | 43 printSend(record._record); |
44 else if (record.type() === WebInspector.TimelineModel.RecordType.Res
ourceReceiveResponse) | 44 else if (record.type() === WebInspector.TimelineModel.RecordType.Res
ourceReceiveResponse) |
45 printReceive(record._record); | 45 printReceive(record._record); |
46 else if (record.type() === WebInspector.TimelineModel.RecordType.Res
ourceFinish) | 46 else if (record.type() === WebInspector.TimelineModel.RecordType.Res
ourceFinish) |
47 printFinish(record._record); | 47 printFinish(record._record); |
48 | 48 |
49 if (record.parent && record.parent.type() === WebInspector.TimelineM
odel.RecordType.Root && !record.isBackground) { | 49 if (record.parent && record.parent.type() === WebInspector.TimelineM
odel.RecordType.Root) { |
50 if (lastRecordStartTime) | 50 if (lastRecordStartTime) |
51 InspectorTest.assertGreaterOrEqual(record.startTime(), lastR
ecordStartTime, "Top level records order violation"); | 51 InspectorTest.assertGreaterOrEqual(record.startTime(), lastR
ecordStartTime, "Top level records order violation"); |
52 lastRecordStartTime = record.startTime(); | 52 lastRecordStartTime = record.startTime(); |
53 } | 53 } |
54 } | 54 } |
55 model.forAllRecords(format); | 55 model.forAllRecords(format); |
56 InspectorTest.completeTest(); | 56 InspectorTest.completeTest(); |
57 } | 57 } |
58 | 58 |
59 function printRecord(record) | 59 function printRecord(record) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 </script> | 94 </script> |
95 </head> | 95 </head> |
96 | 96 |
97 <body onload="runTest()"> | 97 <body onload="runTest()"> |
98 <p> | 98 <p> |
99 Tests the Timeline API instrumentation of a network resource load | 99 Tests the Timeline API instrumentation of a network resource load |
100 </p> | 100 </p> |
101 </body> | 101 </body> |
102 </html> | 102 </html> |
OLD | NEW |