OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../timeline-test.js"></script> | 4 <script src="../timeline-test.js"></script> |
5 <script src="../network-test.js"></script> | 5 <script src="../network-test.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 function performActions(callback) | 8 function performActions(callback) |
9 { | 9 { |
10 var xhr = new XMLHttpRequest(); | 10 var xhr = new XMLHttpRequest(); |
11 xhr.open("GET", "network/resources/resource.php", true); | 11 xhr.open("GET", "network/resources/resource.php", true); |
12 xhr.onload = callback; // This is necessary for XHRLoad event. | 12 xhr.onload = callback; // This is necessary for XHRLoad event. |
13 xhr.onreadystatechange = function () { }; // This is necessary for XHRReady
StateChange event. | 13 xhr.onreadystatechange = function () { }; // This is necessary for XHRReady
StateChange event. |
14 xhr.send(null); | 14 xhr.send(null); |
15 } | 15 } |
16 | 16 |
17 function test() | 17 function test() |
18 { | 18 { |
19 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | 19 InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
20 | 20 |
21 function finish() | 21 function finish() |
22 { | 22 { |
23 InspectorTest.printTimelineRecords("XHRReadyStateChange"); | 23 InspectorTest.printTimelineRecordsWithDetails("XHRReadyStateChange"); |
24 InspectorTest.printTimelineRecords("XHRLoad"); | 24 InspectorTest.printTimelineRecordsWithDetails("XHRLoad"); |
25 InspectorTest.completeTest(); | 25 InspectorTest.completeTest(); |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 </script> | 29 </script> |
30 </head> | 30 </head> |
31 | 31 |
32 <body onload="runTest()"> | 32 <body onload="runTest()"> |
33 <p> | 33 <p> |
34 Tests the Timeline events for XMLHttpReqeust | 34 Tests the Timeline events for XMLHttpReqeust |
35 </p> | 35 </p> |
36 | 36 |
37 </body> | 37 </body> |
38 </html> | 38 </html> |
OLD | NEW |