| 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/network-test.js"></script> | 4 <script src="../http/tests/inspector/network-test.js"></script> |
| 5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
| 6 var test = function() | 6 var test = function() |
| 7 { | 7 { |
| 8 var logView = UI.panels.network._networkLogView; | 8 var logView = UI.panels.network._networkLogView; |
| 9 | 9 |
| 10 function newRequest(headers, data, opt_url) | 10 function newRequest(headers, data, opt_url) |
| 11 { | 11 { |
| 12 var request = new SDK.NetworkRequest(SDK.targetManager.mainTarget(), 0,
opt_url || 'http://example.org/path', 0, 0, 0); | 12 var request = new SDK.NetworkRequest(0, opt_url || 'http://example.org/p
ath', 0, 0, 0); |
| 13 request.requestMethod = data ? "POST" : "GET"; | 13 request.requestMethod = data ? "POST" : "GET"; |
| 14 var headerList = []; | 14 var headerList = []; |
| 15 if (headers) { | 15 if (headers) { |
| 16 for (var i in headers) | 16 for (var i in headers) |
| 17 headerList.push({name: i, value: headers[i]}); | 17 headerList.push({name: i, value: headers[i]}); |
| 18 } | 18 } |
| 19 if (data) { | 19 if (data) { |
| 20 headerList.push({name: "Content-Length", value: data.length}); | 20 headerList.push({name: "Content-Length", value: data.length}); |
| 21 request.requestFormData = data; | 21 request.requestFormData = data; |
| 22 } | 22 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 45 | 45 |
| 46 InspectorTest.completeTest(); | 46 InspectorTest.completeTest(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 </script> | 49 </script> |
| 50 </head> | 50 </head> |
| 51 <body onload="runTest()"> | 51 <body onload="runTest()"> |
| 52 <p>Tests curl command generation</p> | 52 <p>Tests curl command generation</p> |
| 53 </body> | 53 </body> |
| 54 </html> | 54 </html> |
| OLD | NEW |