Changeset 87073 in webkit
- Timestamp:
- May 23, 2011 7:30:47 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87072 r87073 1 2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r87070. 4 http://trac.webkit.org/changeset/87070 5 https://bugs.webkit.org/show_bug.cgi?id=61285 6 7 broke resource-parameters.html on win, weird failures on wk2 8 (Requested by caseq on #webkit). 9 10 * http/tests/inspector/network/network-size.html: 11 * http/tests/inspector/resource-har-conversion-expected.txt: 12 * http/tests/inspector/resource-har-conversion.html: 13 * http/tests/inspector/resource-har-headers-expected.txt: Removed. 14 * http/tests/inspector/resource-har-headers.html: Removed. 15 * http/tests/inspector/resource-parameters-expected.txt: 16 * http/tests/inspector/resources-test.js: 17 1 18 2011-05-23 Qi Zhang <qi.2.zhang@nokia.com> 2 19 -
trunk/LayoutTests/http/tests/inspector/network/network-size.html
r87070 r87073 37 37 InspectorTest.addResult(resource1.url); 38 38 InspectorTest.addResult("resourceSize: " + resource1.resourceSize); 39 InspectorTest.addResult("transferSize: " + (resource1.transferSize - resource1. responseHeadersSize));39 InspectorTest.addResult("transferSize: " + (resource1.transferSize - resource1._responseHeadersSize)); 40 40 41 41 var resource2 = WebInspector.panels.network.resources[resourcesCount - 1]; 42 42 InspectorTest.addResult(resource2.url); 43 43 InspectorTest.addResult("resourceSize: " + resource2.resourceSize); 44 InspectorTest.addResult("transferSize: " + (resource2.transferSize - resource2. responseHeadersSize));44 InspectorTest.addResult("transferSize: " + (resource2.transferSize - resource2._responseHeadersSize)); 45 45 46 46 InspectorTest.completeTest(); -
trunk/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
r87070 r87073 27 27 method : "GET" 28 28 url : "http://127.0.0.1:8000/inspector/inspector-test.js" 29 httpVersion : "HTTP/1.1"30 29 headers : <object> 31 30 queryString : [ … … 60 59 } 61 60 ] 62 headersSize : <number>61 headersSize : -1 63 62 bodySize : <number> 64 63 } … … 66 65 status : 304 67 66 statusText : "Not Modified" 68 httpVersion : "HTTP/1.1"69 67 headers : <object> 70 68 cookies : [ … … 99 97 content : { 100 98 size : <number> 101 compression : <number>102 99 mimeType : "application/x-javascript" 103 100 } 104 101 redirectURL : "" 105 headersSize : <number>102 headersSize : -1 106 103 bodySize : <number> 107 104 } … … 117 114 method : "GET" 118 115 url : "http://127.0.0.1:8000/inspector/resource-har-conversion.html" 119 httpVersion : "HTTP/1.1" 120 headers : <object> 121 queryString : [ 122 ] 123 cookies : [ 124 ] 125 headersSize : <number> 116 headers : <object> 117 queryString : [ 118 ] 119 cookies : [ 120 ] 121 headersSize : -1 126 122 bodySize : <number> 127 123 } … … 129 125 status : 200 130 126 statusText : "OK" 131 httpVersion : "HTTP/1.1" 132 headers : <object> 133 cookies : [ 134 ] 135 content : { 136 size : <number> 137 compression : <number> 127 headers : <object> 128 cookies : [ 129 ] 130 content : { 131 size : <number> 138 132 mimeType : "text/html" 139 133 } 140 134 redirectURL : "" 141 headersSize : <number>135 headersSize : -1 142 136 bodySize : <number> 143 137 } … … 153 147 method : "GET" 154 148 url : "http://127.0.0.1:8000/inspector/resources-test.js" 155 httpVersion : "HTTP/1.1" 156 headers : <object> 157 queryString : [ 158 ] 159 cookies : [ 160 ] 161 headersSize : <number> 149 headers : <object> 150 queryString : [ 151 ] 152 cookies : [ 153 ] 154 headersSize : -1 162 155 bodySize : <number> 163 156 } … … 165 158 status : 304 166 159 statusText : "Not Modified" 167 httpVersion : "HTTP/1.1" 168 headers : <object> 169 cookies : [ 170 ] 171 content : { 172 size : <number> 173 compression : <number> 160 headers : <object> 161 cookies : [ 162 ] 163 content : { 164 size : <number> 174 165 mimeType : "application/x-javascript" 175 166 } 176 167 redirectURL : "" 177 headersSize : <number>168 headersSize : -1 178 169 bodySize : <number> 179 170 } … … 189 180 method : "POST" 190 181 url : "http://127.0.0.1:8000/inspector/resources/post-target.cgi" 191 httpVersion : "HTTP/1.1" 192 headers : <object> 193 queryString : [ 194 ] 195 cookies : [ 196 ] 197 headersSize : <number> 182 headers : <object> 183 queryString : [ 184 ] 185 cookies : [ 186 ] 187 headersSize : -1 198 188 bodySize : <number> 199 189 postData : { … … 205 195 status : 200 206 196 statusText : "OK" 207 httpVersion : "HTTP/1.1" 208 headers : <object> 209 cookies : [ 210 ] 211 content : { 212 size : <number> 213 compression : <number> 197 headers : <object> 198 cookies : [ 199 ] 200 content : { 201 size : <number> 214 202 mimeType : "application/xml" 215 203 } 216 204 redirectURL : "" 217 headersSize : <number>205 headersSize : -1 218 206 bodySize : <number> 219 207 } -
trunk/LayoutTests/http/tests/inspector/resource-har-conversion.html
r87070 r87073 1 <!doctype html>2 1 <html> 3 2 <head> … … 39 38 "Cookie": "a=b; $Path=/path; $Domain=example.com; a1=b1\nc1=d1" 40 39 }; 41 42 40 resource.responseHeaders = { 43 41 "Set-Cookie": "x=y; Path=/path; Domain=example.com; Discard; httpOnly; Secure; Version=1\nx1=y1\nz2=y2" -
trunk/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
r87070 r87073 10 10 method : "POST" 11 11 url : "http://localhost:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=" 12 httpVersion : "HTTP/1.1"13 12 headers : <object> 14 13 queryString : [ … … 24 23 cookies : [ 25 24 ] 26 headersSize : <number>27 bodySize : 3325 headersSize : -1 26 bodySize : -1 28 27 postData : { 29 28 mimeType : "application/x-www-form-urlencoded" … … 44 43 status : 200 45 44 statusText : "OK" 46 httpVersion : "HTTP/1.1"47 45 headers : <object> 48 46 cookies : [ … … 50 48 content : { 51 49 size : 14 52 compression : 053 50 mimeType : "application/xml" 54 51 } 55 52 redirectURL : "" 56 headersSize : <number>53 headersSize : -1 57 54 bodySize : 14 58 55 } -
trunk/LayoutTests/http/tests/inspector/resources-test.js
r87070 r87073 2 2 3 3 InspectorTest.HARNondeterministicProperties = { 4 startedDateTime: 1, 5 time: 1, 6 wait: 1, 7 receive: 1, 4 8 headers: 1, 5 headersSize: 1, 9 timings: 1, 10 version: 1, 11 startedDateTime: 1, 6 12 id: 1, 7 13 onContentLoad: 1, 8 onLoad: 1, 9 receive: 1, 10 startedDateTime: 1, 11 time: 1, 12 timings: 1, 13 version: 1, 14 wait: 1, 14 onLoad: 1 15 15 }; 16 16 … … 20 20 InspectorTest.HARNondeterministicPropertiesWithSize.size = 1; 21 21 InspectorTest.HARNondeterministicPropertiesWithSize.bodySize = 1; 22 InspectorTest.HARNondeterministicPropertiesWithSize.compression = 1;23 24 22 25 23 InspectorTest.resourceURLComparer = function(r1, r2) -
trunk/Source/WebCore/ChangeLog
r87071 r87073 1 2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r87070. 4 http://trac.webkit.org/changeset/87070 5 https://bugs.webkit.org/show_bug.cgi?id=61285 6 7 broke resource-parameters.html on win, weird failures on wk2 8 (Requested by caseq on #webkit). 9 10 * inspector/front-end/HAREntry.js: 11 (WebInspector.HAREntry.prototype.build): 12 (WebInspector.HAREntry.prototype._buildRequest): 13 (WebInspector.HAREntry.prototype._buildResponse): 14 (WebInspector.HAREntry.prototype._buildContent): 15 (WebInspector.HAREntry.prototype._buildCookie): 16 (WebInspector.HAREntry.prototype._interval): 17 (WebInspector.HARLog.prototype.build): 18 * inspector/front-end/Resource.js: 19 (WebInspector.Resource.prototype.set requestHeaders): 20 (WebInspector.Resource.prototype.get requestHeadersText): 21 (WebInspector.Resource.prototype.set requestHeadersText): 22 (WebInspector.Resource.prototype.get requestHeadersSize): 23 (WebInspector.Resource.prototype.set responseHeaders): 24 (WebInspector.Resource.prototype.get responseHeadersText): 25 (WebInspector.Resource.prototype.set responseHeadersText): 26 (WebInspector.Resource.prototype.get responseHeadersSize): 27 (WebInspector.Resource.prototype._headersSize): 28 1 29 2011-05-18 Pavel Podivilov <podivilov@chromium.org> 2 30 -
trunk/Source/WebCore/inspector/front-end/HAREntry.js
r87070 r87073 49 49 request: this._buildRequest(), 50 50 response: this._buildResponse(), 51 cache: { }, // Not supp orted yet.51 cache: { }, // Not supproted yet. 52 52 timings: this._buildTimings() 53 53 }; … … 59 59 method: this._resource.requestMethod, 60 60 url: this._resource.url, 61 httpVersion: this._resource.requestHttpVersion,61 // httpVersion: "HTTP/1.1" -- Not available. 62 62 headers: this._buildHeaders(this._resource.requestHeaders), 63 63 queryString: this._buildParameters(this._resource.queryParameters || []), 64 64 cookies: this._buildCookies(this._resource.requestCookies || []), 65 headersSize: this._resource.requestHeadersSize,66 bodySize: this.requestBodySize65 headersSize: -1, // Not available. 66 bodySize: -1 // Not available. 67 67 }; 68 68 if (this._resource.requestFormData) 69 69 res.postData = this._buildPostData(); 70 71 70 return res; 72 71 }, … … 77 76 status: this._resource.statusCode, 78 77 statusText: this._resource.statusText, 79 httpVersion: this._resource.responseHttpVersion,78 // "httpVersion": "HTTP/1.1" -- Not available. 80 79 headers: this._buildHeaders(this._resource.responseHeaders), 81 80 cookies: this._buildCookies(this._resource.responseCookies || []), 82 81 content: this._buildContent(), 83 82 redirectURL: this._resource.responseHeaderValue("Location") || "", 84 headersSize: this._resource.responseHeadersSize,85 bodySize: this. responseBodySize83 headersSize: -1, // Not available. 84 bodySize: this._resource.resourceSize 86 85 }; 87 86 }, … … 91 90 return { 92 91 size: this._resource.resourceSize, 93 compression: this.responseCompression,92 // compression: 0, -- Not available. 94 93 mimeType: this._resource.mimeType, 95 // text: this._resource.content // TODO: pull out into a boolean flag, as content can be huge (and needs to be requested with an async call)94 // text: -- Not available. 96 95 }; 97 96 }, … … 161 160 _buildCookie: function(cookie) 162 161 { 162 163 163 return { 164 164 name: cookie.name, … … 179 179 var startTime = timing[start]; 180 180 return typeof startTime !== "number" || startTime === -1 ? -1 : Math.round(timing[end] - startTime); 181 },182 183 get requestBodySize()184 {185 return !this._resource.requestFormData ? 0 : this._resource.requestFormData.length;186 },187 188 get responseBodySize()189 {190 return this._resource.transferSize - this._resource.responseHeadersSize191 },192 193 get responseCompression()194 {195 return this._resource.resourceSize - (this._resource.transferSize - this._resource.responseHeadersSize);196 181 } 197 182 } … … 210 195 { 211 196 var webKitVersion = /AppleWebKit\/([^ ]+)/.exec(window.navigator.userAgent); 212 197 213 198 return { 214 199 version: "1.2", -
trunk/Source/WebCore/inspector/front-end/Resource.js
r87070 r87073 7 7 * 8 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * its contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 15 * from this software without specific prior written permission. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 492 492 delete this._sortedRequestHeaders; 493 493 delete this._requestCookies; 494 delete this._responseHeadersSize; 494 495 495 496 this.dispatchEventToListeners("requestHeaders changed"); … … 498 499 get requestHeadersText() 499 500 { 500 if (this._requestHeadersText === undefined) { 501 this._requestHeadersText = this.requestMethod + " " + this.url + " HTTP/1.1\r\n"; 502 for (var key in this.requestHeaders) 503 this._requestHeadersText += key + ": " + this.requestHeaders[key] + "\r\n"; 504 } 501 if (this._requestHeadersText !== undefined) 502 return this._requestHeadersText; 503 504 this._requestHeadersText = ""; 505 for (var key in this.requestHeaders) 506 this._requestHeadersText += key + ": " + this.requestHeaders[key] + "\n"; 505 507 return this._requestHeadersText; 506 508 }, … … 509 511 { 510 512 this._requestHeadersText = x; 513 delete this._responseHeadersSize; 511 514 512 515 this.dispatchEventToListeners("requestHeaders changed"); … … 515 518 get requestHeadersSize() 516 519 { 517 return this.requestHeadersText.length; 520 if (typeof(this._requestHeadersSize) === "undefined") { 521 if (this._requestHeadersText) 522 this._requestHeadersSize = this._requestHeadersText.length; 523 else 524 this._requestHeadersSize = this._headersSize(this._requestHeaders) 525 } 526 return this._requestHeadersSize; 518 527 }, 519 528 … … 554 563 }, 555 564 556 get requestHttpVersion()557 {558 var firstLine = this.requestHeadersText.split(/\r\n/)[0];559 var match = firstLine.match(/(HTTP\/\d+\.\d+)$/);560 return match ? match[1] : undefined;561 },562 563 565 get responseHeaders() 564 566 { … … 569 571 { 570 572 this._responseHeaders = x; 573 delete this._responseHeadersSize; 571 574 delete this._sortedResponseHeaders; 572 575 delete this._responseCookies; … … 574 577 this.dispatchEventToListeners("responseHeaders changed"); 575 578 }, 576 579 577 580 get responseHeadersText() 578 581 { 579 if (this._responseHeadersText === undefined) { 580 this._responseHeadersText = "HTTP/1.1 " + this.statusCode + " " + this.statusText + "\r\n"; 581 for (var key in this.responseHeaders) 582 this._responseHeadersText += key + ": " + this.responseHeaders[key] + "\r\n"; 583 } 582 if (this._responseHeadersText !== undefined) 583 return this._responseHeadersText; 584 585 this._responseHeadersText = ""; 586 for (var key in this.responseHeaders) 587 this._responseHeadersText += key + ": " + this.responseHeaders[key] + "\n"; 584 588 return this._responseHeadersText; 585 589 }, … … 588 592 { 589 593 this._responseHeadersText = x; 594 delete this._responseHeadersSize; 590 595 591 596 this.dispatchEventToListeners("responseHeaders changed"); 592 597 }, 593 598 594 599 get responseHeadersSize() 595 600 { 596 return this.responseHeadersText.length; 597 }, 601 if (typeof(this._responseHeadersSize) === "undefined") { 602 if (this._responseHeadersText) 603 this._responseHeadersSize = this._responseHeadersText.length; 604 else 605 this._responseHeadersSize = this._headersSize(this._responseHeaders) 606 } 607 return this._responseHeadersSize; 608 }, 609 598 610 599 611 get sortedResponseHeaders() … … 644 656 this._parsedFormParameters = this._parseParameters(this.requestFormData); 645 657 return this._parsedFormParameters; 646 },647 648 get responseHttpVersion()649 {650 var match = this.responseHeadersText.match(/^(HTTP\/\d+\.\d+)/);651 return match ? match[1] : undefined;652 658 }, 653 659 … … 676 682 return headers[header]; 677 683 } 684 }, 685 686 _headersSize: function(headers) 687 { 688 // We should take actual headers size from network stack, when possible, but fall back to 689 // this lousy computation when no headers text is available. 690 var size = 0; 691 for (var header in headers) 692 size += header.length + headers[header].length + 4; // _typical_ overhead per header is ": ".length + "\r\n".length. 693 return size; 678 694 }, 679 695
Note: See TracChangeset
for help on using the changeset viewer.