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