Changeset 66669 in webkit
- Timestamp:
- Sep 2, 2010 8:29:03 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66666 r66669 1 2010-09-02 Andrey Kosyakov <caseq@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: HAR converter fails on POST requests with non-form content type. 6 Migrated HAR tests to inspector-test2.js, enabled resource tracking, added test for XHR POST request. 7 https://bugs.webkit.org/show_bug.cgi?id=45109 8 9 * http/tests/inspector/resource-har-conversion-expected.txt: 10 * http/tests/inspector/resource-har-conversion.html: 11 * http/tests/inspector/resource-parameters-expected.txt: 12 * http/tests/inspector/resource-test2.js: Added. 13 (initialize_ResourceTest.InspectorTest.resourceURLComparer): 14 (initialize_ResourceTest): 15 * platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt: 16 * platform/chromium-win/http/tests/inspector/resource-har-conversion-expected.txt: Added. 17 * platform/win/http/tests/inspector/console-xhr-logging-expected.txt: Added. 18 * platform/win/http/tests/inspector/resource-har-conversion-expected.txt: Added. 19 * platform/win/http/tests/inspector/resource-parameters-expected.txt: 20 1 21 2010-09-02 Peter Kasting <pkasting@google.com> 2 22 -
trunk/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
r60562 r66669 1 1 Tests conversion of Inspector's resource representation into HAR format. 2 2 3 Page reloaded. 3 4 { 4 5 0 : { 5 6 pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html" 6 startedDateTime : <string> 7 startedDateTime : <object> 8 time : <number> 9 request : { 10 method : "GET" 11 url : "http://127.0.0.1:8000/inspector/inspector-test2.js" 12 headers : <object> 13 headersSize : -1 14 bodySize : -1 15 } 16 response : { 17 status : 304 18 statusText : "Not Modified" 19 headers : <object> 20 content : { 21 size : 0 22 mimeType : "application/x-javascript" 23 } 24 redirectURL : "" 25 headersSize : -1 26 bodySize : 0 27 } 28 timings : { 29 blocked : -1 30 dns : -1 31 connect : -1 32 send : -1 33 wait : <number> 34 receive : <number> 35 ssl : -1 36 } 37 } 38 1 : { 39 pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html" 40 startedDateTime : <object> 7 41 time : <number> 8 42 request : { … … 18 52 headers : <object> 19 53 content : { 20 size : 77854 size : 1137 21 55 mimeType : "text/html" 22 56 } 23 57 redirectURL : "" 24 58 headersSize : -1 25 bodySize : 778 59 bodySize : 1137 60 } 61 timings : { 62 blocked : -1 63 dns : -1 64 connect : -1 65 send : -1 66 wait : <number> 67 receive : <number> 68 ssl : -1 69 } 70 } 71 2 : { 72 pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html" 73 startedDateTime : <object> 74 time : <number> 75 request : { 76 method : "GET" 77 url : "http://127.0.0.1:8000/inspector/resource-test2.js" 78 headers : <object> 79 headersSize : -1 80 bodySize : -1 81 } 82 response : { 83 status : 304 84 statusText : "Not Modified" 85 headers : <object> 86 content : { 87 size : 0 88 mimeType : "application/x-javascript" 89 } 90 redirectURL : "" 91 headersSize : -1 92 bodySize : 0 93 } 94 timings : { 95 blocked : -1 96 dns : -1 97 connect : -1 98 send : -1 99 wait : <number> 100 receive : <number> 101 ssl : -1 102 } 103 } 104 3 : { 105 pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html" 106 startedDateTime : <object> 107 time : <number> 108 request : { 109 method : "POST" 110 url : "http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html" 111 headers : <object> 112 headersSize : -1 113 bodySize : -1 114 postData : { 115 mimeType : "text/xml" 116 text : "<xml></xml>" 117 } 118 } 119 response : { 120 status : 404 121 statusText : "Not Found" 122 headers : <object> 123 content : { 124 size : 355 125 mimeType : "text/html" 126 } 127 redirectURL : "" 128 headersSize : -1 129 bodySize : 355 26 130 } 27 131 timings : { -
trunk/LayoutTests/http/tests/inspector/resource-har-conversion.html
r60562 r66669 1 1 <html> 2 2 <head> 3 <script src=" inspector-test.js"></script>4 <script src=" resource-tests.js"></script>3 <script src="resource-test2.js"></script> 4 <script src="inspector-test2.js"></script> 5 5 6 6 <script> 7 function doit() 7 8 var test = function() 8 9 { 9 dumpResources(); 10 function getHAR(id) 11 { 12 return new WebInspector.HAREntry(WebInspector.resources[id]).build(); 13 } 14 15 InspectorTest.enableResourceTracking(function() { 16 InjectedScriptAccess.getDefault().evaluate("doXHR()", "console", function() { 17 var resources = Object.keys(WebInspector.resources).map(getHAR).sort(InspectorTest.resourceURLComparer); 18 InspectorTest.addObject(resources, InspectorTest.HARNondeterministicProperties); 19 InspectorTest.disableResourceTracking(); 20 InspectorTest.completeTest(); 21 }); 22 }); 10 23 } 11 24 12 function dumpResources() { 13 function callback(result) 14 { 15 dumpObject(result.sort(resourceURLComparer), HARNondeterministicProperties); 16 notifyDone(); 17 } 25 // Make a POST requests to see we handle non-post form data well. 18 26 19 evaluateInWebInspector("frontend_dumpResources", callback); 27 function doXHR() 28 { 29 var xhr = new XMLHttpRequest(); 30 xhr.open("POST", "resources/xhr-does-not-exist.html", false); 31 xhr.setRequestHeader("Content-Type", "text/xml"); 32 xhr.send("<xml></xml>"); 20 33 } 21 34 22 // Frontend functions. 35 </script> 23 36 24 function frontend_dumpResources() 25 { 26 var result = []; 27 for (var resource in WebInspector.resources) 28 result.push(new WebInspector.HAREntry(WebInspector.resources[resource]).build()); 29 return result; 30 } 31 </script> 37 32 38 </head> 33 39 34 <body onload=" onload()">40 <body onload="runTest()"> 35 41 <p> 36 42 Tests conversion of Inspector's resource representation into HAR format. -
trunk/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
r60562 r66669 25 25 postData : { 26 26 mimeType : "application/x-www-form-urlencoded" 27 text : "formParam1=formValue1&formParam2=" 27 28 params : { 28 29 0 : { … … 35 36 } 36 37 } 37 text : "formParam1=formValue1&formParam2="38 38 } 39 39 } -
trunk/LayoutTests/platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt
r66215 r66669 25 25 postData : { 26 26 mimeType : "application/x-www-form-urlencoded" 27 text : "formParam1=formValue1&formParam2=" 27 28 params : { 28 29 0 : { … … 35 36 } 36 37 } 37 text : "formParam1=formValue1&formParam2="38 38 } 39 39 } -
trunk/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
r63791 r66669 25 25 postData : { 26 26 mimeType : "application/x-www-form-urlencoded" 27 text : "formParam1=formValue1&formParam2=" 27 28 params : { 28 29 0 : { … … 35 36 } 36 37 } 37 text : "formParam1=formValue1&formParam2="38 38 } 39 39 } -
trunk/WebCore/ChangeLog
r66667 r66669 1 2010-09-02 Andrey Kosyakov <caseq@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: HAR converter fails on POST requests with non-form content type 6 https://bugs.webkit.org/show_bug.cgi?id=45109 7 8 * inspector/front-end/HAREntry.js: 9 (WebInspector.HAREntry.prototype._buildPostData): 10 1 11 2010-09-02 Andreas Kling <andreas.kling@nokia.com> 2 12 -
trunk/WebCore/inspector/front-end/HAREntry.js
r60562 r66669 117 117 _buildPostData: function() 118 118 { 119 return{119 var res = { 120 120 mimeType: this._resource.requestHeaderValue("Content-Type"), 121 params: this._buildParameters(this._resource.formParameters),122 121 text: this._resource.requestFormData 123 122 }; 123 if (this._resource.formParameters) 124 res.params = this._buildParameters(this._resource.formParameters); 125 return res; 124 126 }, 125 127
Note: See TracChangeset
for help on using the changeset viewer.