| 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="../network-test.js"></script> | 4 <script src="../network-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "dataRece
ived", dataReceived); | 9 InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "dataRece
ived", dataReceived); |
| 10 InspectorTest.resetInspectorResourcesData(start); | 10 InspectorTest.resetInspectorResourcesData(start); |
| 11 | 11 |
| 12 function start() | 12 function start() |
| 13 { | 13 { |
| 14 InspectorTest.recordNetwork(); | 14 InspectorTest.recordNetwork(); |
| 15 InspectorTest.makeXHR("GET", "resources/resource.php", true, undefined,
undefined, [], false, undefined, "blob", function () { }); | 15 InspectorTest.makeXHR("GET", "resources/resource.php", true, undefined,
undefined, [], false, undefined, "blob", function () { }); |
| 16 } | 16 } |
| 17 | 17 |
| 18 function dataReceived(requestId, time, dataLength, encodedDataLength) | 18 function dataReceived(requestId, time, dataLength, encodedDataLength) |
| 19 { | 19 { |
| 20 var request = WebInspector.networkLog.requestForId(requestId); | 20 var request = InspectorTest.networkLog.requestForId(requestId); |
| 21 if (/resource\.php/.exec(request.url)) { | 21 if (/resource\.php/.exec(request.url)) { |
| 22 InspectorTest.addResult("Received data for resource.php"); | 22 InspectorTest.addResult("Received data for resource.php"); |
| 23 InspectorTest.addResult("SUCCESS"); | 23 InspectorTest.addResult("SUCCESS"); |
| 24 InspectorTest.completeTest(); | 24 InspectorTest.completeTest(); |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 </script> | 28 </script> |
| 29 </head> | 29 </head> |
| 30 <body onload="runTest()"> | 30 <body onload="runTest()"> |
| 31 <p>Tests that dataReceived is called on NetworkDispatcher for XHR with responseT
ype="blob".</p> | 31 <p>Tests that dataReceived is called on NetworkDispatcher for XHR with responseT
ype="blob".</p> |
| 32 </body> | 32 </body> |
| 33 </html> | 33 </html> |
| OLD | NEW |