Changeset 87073 in webkit


Ignore:
Timestamp:
May 23, 2011 7:30:47 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r87070.
http://trac.webkit.org/changeset/87070
https://bugs.webkit.org/show_bug.cgi?id=61285

broke resource-parameters.html on win, weird failures on wk2
(Requested by caseq on #webkit).

  • http/tests/inspector/network/network-size.html:
  • http/tests/inspector/resource-har-conversion-expected.txt:
  • http/tests/inspector/resource-har-conversion.html:
  • http/tests/inspector/resource-har-headers-expected.txt: Removed.
  • http/tests/inspector/resource-har-headers.html: Removed.
  • http/tests/inspector/resource-parameters-expected.txt:
  • http/tests/inspector/resources-test.js:

2011-05-23 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r87070.
http://trac.webkit.org/changeset/87070
https://bugs.webkit.org/show_bug.cgi?id=61285

broke resource-parameters.html on win, weird failures on wk2
(Requested by caseq on #webkit).

Location:
trunk
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87072 r87073  
     12011-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
    1182011-05-23  Qi Zhang  <qi.2.zhang@nokia.com>
    219
  • trunk/LayoutTests/http/tests/inspector/network/network-size.html

    r87070 r87073  
    3737        InspectorTest.addResult(resource1.url);
    3838        InspectorTest.addResult("resourceSize: " + resource1.resourceSize);
    39         InspectorTest.addResult("transferSize: " + (resource1.transferSize - resource1.responseHeadersSize));
     39        InspectorTest.addResult("transferSize: " + (resource1.transferSize - resource1._responseHeadersSize));
    4040
    4141        var resource2 = WebInspector.panels.network.resources[resourcesCount - 1];
    4242        InspectorTest.addResult(resource2.url);
    4343        InspectorTest.addResult("resourceSize: " + resource2.resourceSize);
    44         InspectorTest.addResult("transferSize: " + (resource2.transferSize - resource2.responseHeadersSize));
     44        InspectorTest.addResult("transferSize: " + (resource2.transferSize - resource2._responseHeadersSize));
    4545
    4646        InspectorTest.completeTest();
  • trunk/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt

    r87070 r87073  
    2727                method : "GET"
    2828                url : "http://127.0.0.1:8000/inspector/inspector-test.js"
    29                 httpVersion : "HTTP/1.1"
    3029                headers : <object>
    3130                queryString : [
     
    6059                    }
    6160                ]
    62                 headersSize : <number>
     61                headersSize : -1
    6362                bodySize : <number>
    6463            }
     
    6665                status : 304
    6766                statusText : "Not Modified"
    68                 httpVersion : "HTTP/1.1"
    6967                headers : <object>
    7068                cookies : [
     
    9997                content : {
    10098                    size : <number>
    101                     compression : <number>
    10299                    mimeType : "application/x-javascript"
    103100                }
    104101                redirectURL : ""
    105                 headersSize : <number>
     102                headersSize : -1
    106103                bodySize : <number>
    107104            }
     
    117114                method : "GET"
    118115                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
    126122                bodySize : <number>
    127123            }
     
    129125                status : 200
    130126                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>
    138132                    mimeType : "text/html"
    139133                }
    140134                redirectURL : ""
    141                 headersSize : <number>
     135                headersSize : -1
    142136                bodySize : <number>
    143137            }
     
    153147                method : "GET"
    154148                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
    162155                bodySize : <number>
    163156            }
     
    165158                status : 304
    166159                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>
    174165                    mimeType : "application/x-javascript"
    175166                }
    176167                redirectURL : ""
    177                 headersSize : <number>
     168                headersSize : -1
    178169                bodySize : <number>
    179170            }
     
    189180                method : "POST"
    190181                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
    198188                bodySize : <number>
    199189                postData : {
     
    205195                status : 200
    206196                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>
    214202                    mimeType : "application/xml"
    215203                }
    216204                redirectURL : ""
    217                 headersSize : <number>
     205                headersSize : -1
    218206                bodySize : <number>
    219207            }
  • trunk/LayoutTests/http/tests/inspector/resource-har-conversion.html

    r87070 r87073  
    1 <!doctype html>
    21<html>
    32<head>
     
    3938                "Cookie": "a=b; $Path=/path; $Domain=example.com; a1=b1\nc1=d1"
    4039            };
    41 
    4240            resource.responseHeaders = {
    4341                "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  
    1010        method : "POST"
    1111        url : "http://localhost:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2="
    12         httpVersion : "HTTP/1.1"
    1312        headers : <object>
    1413        queryString : [
     
    2423        cookies : [
    2524        ]
    26         headersSize : <number>
    27         bodySize : 33
     25        headersSize : -1
     26        bodySize : -1
    2827        postData : {
    2928            mimeType : "application/x-www-form-urlencoded"
     
    4443        status : 200
    4544        statusText : "OK"
    46         httpVersion : "HTTP/1.1"
    4745        headers : <object>
    4846        cookies : [
     
    5048        content : {
    5149            size : 14
    52             compression : 0
    5350            mimeType : "application/xml"
    5451        }
    5552        redirectURL : ""
    56         headersSize : <number>
     53        headersSize : -1
    5754        bodySize : 14
    5855    }
  • trunk/LayoutTests/http/tests/inspector/resources-test.js

    r87070 r87073  
    22
    33InspectorTest.HARNondeterministicProperties = {
     4    startedDateTime: 1,
     5    time: 1,
     6    wait: 1,
     7    receive: 1,
    48    headers: 1,
    5     headersSize: 1,
     9    timings: 1,
     10    version: 1,
     11    startedDateTime: 1,
    612    id: 1,
    713    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
    1515};
    1616
     
    2020InspectorTest.HARNondeterministicPropertiesWithSize.size = 1;
    2121InspectorTest.HARNondeterministicPropertiesWithSize.bodySize = 1;
    22 InspectorTest.HARNondeterministicPropertiesWithSize.compression = 1;
    23 
    2422
    2523InspectorTest.resourceURLComparer = function(r1, r2)
  • trunk/Source/WebCore/ChangeLog

    r87071 r87073  
     12011-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
    1292011-05-18  Pavel Podivilov  <podivilov@chromium.org>
    230
  • trunk/Source/WebCore/inspector/front-end/HAREntry.js

    r87070 r87073  
    4949            request: this._buildRequest(),
    5050            response: this._buildResponse(),
    51             cache: { }, // Not supported yet.
     51            cache: { }, // Not supproted yet.
    5252            timings: this._buildTimings()
    5353        };
     
    5959            method: this._resource.requestMethod,
    6060            url: this._resource.url,
    61             httpVersion: this._resource.requestHttpVersion,
     61            // httpVersion: "HTTP/1.1" -- Not available.
    6262            headers: this._buildHeaders(this._resource.requestHeaders),
    6363            queryString: this._buildParameters(this._resource.queryParameters || []),
    6464            cookies: this._buildCookies(this._resource.requestCookies || []),
    65             headersSize: this._resource.requestHeadersSize,
    66             bodySize: this.requestBodySize
     65            headersSize: -1, // Not available.
     66            bodySize: -1 // Not available.
    6767        };
    6868        if (this._resource.requestFormData)
    6969            res.postData = this._buildPostData();
    70 
    7170        return res;
    7271    },
     
    7776            status: this._resource.statusCode,
    7877            statusText: this._resource.statusText,
    79             httpVersion: this._resource.responseHttpVersion,
     78            // "httpVersion": "HTTP/1.1" -- Not available.
    8079            headers: this._buildHeaders(this._resource.responseHeaders),
    8180            cookies: this._buildCookies(this._resource.responseCookies || []),
    8281            content: this._buildContent(),
    8382            redirectURL: this._resource.responseHeaderValue("Location") || "",
    84             headersSize: this._resource.responseHeadersSize,
    85             bodySize: this.responseBodySize
     83            headersSize: -1, // Not available.
     84            bodySize: this._resource.resourceSize
    8685        };
    8786    },
     
    9190        return {
    9291            size: this._resource.resourceSize,
    93             compression: this.responseCompression,
     92            // compression: 0, -- Not available.
    9493            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.
    9695        };
    9796    },
     
    161160    _buildCookie: function(cookie)
    162161    {
     162       
    163163        return {
    164164            name: cookie.name,
     
    179179        var startTime = timing[start];
    180180        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.responseHeadersSize
    191     },
    192 
    193     get responseCompression()
    194     {
    195         return this._resource.resourceSize - (this._resource.transferSize - this._resource.responseHeadersSize);
    196181    }
    197182}
     
    210195    {
    211196        var webKitVersion = /AppleWebKit\/([^ ]+)/.exec(window.navigator.userAgent);
    212 
     197       
    213198        return {
    214199            version: "1.2",
  • trunk/Source/WebCore/inspector/front-end/Resource.js

    r87070 r87073  
    77 *
    88 * 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. 
    1010 * 2.  Redistributions in binary form must reproduce the above copyright
    1111 *     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. 
    1313 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    1414 *     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. 
    1616 *
    1717 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     
    492492        delete this._sortedRequestHeaders;
    493493        delete this._requestCookies;
     494        delete this._responseHeadersSize;
    494495
    495496        this.dispatchEventToListeners("requestHeaders changed");
     
    498499    get requestHeadersText()
    499500    {
    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";
    505507        return this._requestHeadersText;
    506508    },
     
    509511    {
    510512        this._requestHeadersText = x;
     513        delete this._responseHeadersSize;
    511514
    512515        this.dispatchEventToListeners("requestHeaders changed");
     
    515518    get requestHeadersSize()
    516519    {
    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;
    518527    },
    519528
     
    554563    },
    555564
    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 
    563565    get responseHeaders()
    564566    {
     
    569571    {
    570572        this._responseHeaders = x;
     573        delete this._responseHeadersSize;
    571574        delete this._sortedResponseHeaders;
    572575        delete this._responseCookies;
     
    574577        this.dispatchEventToListeners("responseHeaders changed");
    575578    },
    576 
     579   
    577580    get responseHeadersText()
    578581    {
    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";
    584588        return this._responseHeadersText;
    585589    },
     
    588592    {
    589593        this._responseHeadersText = x;
     594        delete this._responseHeadersSize;
    590595
    591596        this.dispatchEventToListeners("responseHeaders changed");
    592597    },
    593 
     598   
    594599    get responseHeadersSize()
    595600    {
    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   
    598610
    599611    get sortedResponseHeaders()
     
    644656        this._parsedFormParameters = this._parseParameters(this.requestFormData);
    645657        return this._parsedFormParameters;
    646     },
    647 
    648     get responseHttpVersion()
    649     {
    650         var match = this.responseHeadersText.match(/^(HTTP\/\d+\.\d+)/);
    651         return match ? match[1] : undefined;
    652658    },
    653659
     
    676682                return headers[header];
    677683        }
     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;
    678694    },
    679695
Note: See TracChangeset for help on using the changeset viewer.