| 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 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var loggedHeaders = { | 8 var loggedHeaders = { |
| 9 "cache-control": true, | 9 "cache-control": true, |
| 10 "expires": true, | 10 "expires": true, |
| 11 "last-modified": true, | 11 "last-modified": true, |
| 12 "pragma": true | 12 "pragma": true |
| 13 }; | 13 }; |
| 14 function testLoadForURL(url, headers, next) | 14 function testLoadForURL(url, headers, next) |
| 15 { | 15 { |
| 16 InspectorTest.recordNetwork(); | 16 InspectorTest.recordNetwork(); |
| 17 InspectorTest.addResult("Loading resource from " + url); | 17 InspectorTest.addResult("Loading resource from " + url); |
| 18 InspectorTest.NetworkAgent.loadResourceForFrontend(WebInspector.resource
TreeModel.mainFrame.id, url, headers, callback); | 18 InspectorTest.NetworkAgent.loadResourceForFrontend(InspectorTest.resourc
eTreeModel.mainFrame.id, url, headers, callback); |
| 19 | 19 |
| 20 function callback(error, statusCode, headers, content) | 20 function callback(error, statusCode, headers, content) |
| 21 { | 21 { |
| 22 if (error) | 22 if (error) |
| 23 InspectorTest.addResult("Failed: " + error); | 23 InspectorTest.addResult("Failed: " + error); |
| 24 else { | 24 else { |
| 25 InspectorTest.addResult("Success: " + statusCode); | 25 InspectorTest.addResult("Success: " + statusCode); |
| 26 var headersArray = []; | 26 var headersArray = []; |
| 27 for (var name in headers) { | 27 for (var name in headers) { |
| 28 var nameLower = name.toLowerCase(); | 28 var nameLower = name.toLowerCase(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 testLoadForURL("http://127.0.0.1:8000/inspector/network/resource
s/print-cookie.php", undefined, next); | 80 testLoadForURL("http://127.0.0.1:8000/inspector/network/resource
s/print-cookie.php", undefined, next); |
| 81 } | 81 } |
| 82 }, | 82 }, |
| 83 ]); | 83 ]); |
| 84 } | 84 } |
| 85 </script> | 85 </script> |
| 86 </head> | 86 </head> |
| 87 <body onload="runTest()"> | 87 <body onload="runTest()"> |
| 88 </body> | 88 </body> |
| 89 </html> | 89 </html> |
| OLD | NEW |