| 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="network-test.js"></script> | 5 <script src="network-test.js"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function doXHR() | 9 function doXHR() |
| 10 { | 10 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 function addCookieHeadersToRequest(request) | 37 function addCookieHeadersToRequest(request) |
| 38 { | 38 { |
| 39 request.setRequestHeaders([ | 39 request.setRequestHeaders([ |
| 40 { name: "Cookie", value: "a=b; $Path=/path; $Domain=example.com;
a1=b1\nc1=d1" } | 40 { name: "Cookie", value: "a=b; $Path=/path; $Domain=example.com;
a1=b1\nc1=d1" } |
| 41 ]); | 41 ]); |
| 42 | 42 |
| 43 request.responseHeaders = [ | 43 request.responseHeaders = [ |
| 44 { name: "Set-Cookie", value: "x=y; Path=/path; Domain=example.co
m; Discard; httpOnly; Secure; Version=1\nx1=y1\nz2=y2" } | 44 { name: "Set-Cookie", value: "x=y; Path=/path; Domain=example.co
m; Discard; httpOnly; Secure; Version=1\nx1=y1; SameSite=Strict\nz2=y2; SameSite
=Lax" } |
| 45 ]; | 45 ]; |
| 46 } | 46 } |
| 47 | 47 |
| 48 addCookieHeadersToRequest(findRequestByURL(/inspector-test\.js$/)); | 48 addCookieHeadersToRequest(findRequestByURL(/inspector-test\.js$/)); |
| 49 var log = (new WebInspector.HARLog(InspectorTest.networkRequests())).bui
ld(); | 49 var log = (new WebInspector.HARLog(InspectorTest.networkRequests())).bui
ld(); |
| 50 // Filter out favicon.ico requests that only appear on certain platforms
. | 50 // Filter out favicon.ico requests that only appear on certain platforms
. |
| 51 log.entries = log.entries.filter(function(entry) { | 51 log.entries = log.entries.filter(function(entry) { |
| 52 return !/favicon\.ico$/.test(entry.request.url); | 52 return !/favicon\.ico$/.test(entry.request.url); |
| 53 }); | 53 }); |
| 54 log.entries.sort(InspectorTest.requestURLComparer); | 54 log.entries.sort(InspectorTest.requestURLComparer); |
| 55 InspectorTest.addObject(log, InspectorTest.HARPropertyFormattersWithSize
); | 55 InspectorTest.addObject(log, InspectorTest.HARPropertyFormattersWithSize
); |
| 56 var pageTimings = log.pages[0].pageTimings; | 56 var pageTimings = log.pages[0].pageTimings; |
| 57 InspectorTest.completeTest(); | 57 InspectorTest.completeTest(); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 </script> | 61 </script> |
| 62 | 62 |
| 63 | 63 |
| 64 </head> | 64 </head> |
| 65 | 65 |
| 66 <body onload="runTest()"> | 66 <body onload="runTest()"> |
| 67 <p> | 67 <p> |
| 68 Tests conversion of Inspector's resource representation into HAR format. | 68 Tests conversion of Inspector's resource representation into HAR format. |
| 69 </p> | 69 </p> |
| 70 | 70 |
| 71 </body> | 71 </body> |
| 72 </html> | 72 </html> |
| OLD | NEW |