| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="inspector-test.js"></script> | 4 <script src="inspector-test.js"></script> |
| 5 <script src="resources-test.js"></script> | 5 <script src="resources-test.js"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 var test = function() | 8 var test = function() |
| 9 { | 9 { |
| 10 function visibleNewlines(s) | 10 function visibleNewlines(s) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 request.documentURL = "http://example.com/inspector-test.js"; | 27 request.documentURL = "http://example.com/inspector-test.js"; |
| 28 request.requestMethod = "GET"; | 28 request.requestMethod = "GET"; |
| 29 request.mimeType = "text/html"; | 29 request.mimeType = "text/html"; |
| 30 request.statusCode = 200; | 30 request.statusCode = 200; |
| 31 request.statusText = "OK"; | 31 request.statusText = "OK"; |
| 32 request.resourceSize = 1000; | 32 request.resourceSize = 1000; |
| 33 request._transferSize = 539; // 39 = header size at the end of the day | 33 request._transferSize = 539; // 39 = header size at the end of the day |
| 34 } | 34 } |
| 35 | 35 |
| 36 WebInspector.inspectorView.showPanel("network"); | 36 WebInspector.inspectorView.showPanel("network"); |
| 37 var testRequest = new WebInspector.NetworkRequest(WebInspector.targetManager
.activeTarget(), "testRequest", "http://example.com/inspector-test.js", 1); | 37 var testRequest = new WebInspector.NetworkRequest(WebInspector.targetManager
.mainTarget(), "testRequest", "http://example.com/inspector-test.js", 1); |
| 38 setRequestValues(testRequest); | 38 setRequestValues(testRequest); |
| 39 var headersText = testRequest.requestHeadersText(); | 39 var headersText = testRequest.requestHeadersText(); |
| 40 var requestResults = { | 40 var requestResults = { |
| 41 "request": { | 41 "request": { |
| 42 "headers": testRequest.requestHeaders(), | 42 "headers": testRequest.requestHeaders(), |
| 43 "headersText": visibleNewlines(headersText), | 43 "headersText": visibleNewlines(headersText), |
| 44 "headersSize": headersText.length, | 44 "headersSize": headersText.length, |
| 45 }, | 45 }, |
| 46 "response": { | 46 "response": { |
| 47 "headers": testRequest.responseHeaders, | 47 "headers": testRequest.responseHeaders, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 </head> | 68 </head> |
| 69 | 69 |
| 70 <body onload="runTest()"> | 70 <body onload="runTest()"> |
| 71 <p> | 71 <p> |
| 72 Tests the nondeterministic bits of HAR conversion via the magic of hard-coded va
lues. | 72 Tests the nondeterministic bits of HAR conversion via the magic of hard-coded va
lues. |
| 73 </p> | 73 </p> |
| 74 | 74 |
| 75 </body> | 75 </body> |
| 76 </html> | 76 </html> |
| OLD | NEW |