Commit 2116b004 authored by caseq@chromium.org's avatar caseq@chromium.org
Browse files

2011-04-08 Andrey Kosyakov <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: HAR compliance fixes
        https://bugs.webkit.org/show_bug.cgi?id=58124

        - Always provide some values for queryString and cookies, even though arrays may be empty
        - Always provide an empty cache object
        - Added entire HARLog to test
        - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)

        * inspector/front-end/HAREntry.js:
        (WebInspector.HAREntry.prototype.build):
        (WebInspector.HAREntry.prototype._buildRequest):
        (WebInspector.HAREntry.prototype._buildResponse):

2011-04-08  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: HAR compliance fixes
        https://bugs.webkit.org/show_bug.cgi?id=58124

        - Added entire HARLog to test
        - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms

        * http/tests/inspector/resource-har-conversion-expected.txt:
        * http/tests/inspector/resource-har-conversion.html:
        * http/tests/inspector/resources-test.js:
        * platform/mac-wk2/http/tests/inspector/resource-har-conversion-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b54a4de2
2011-04-08 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: HAR compliance fixes
https://bugs.webkit.org/show_bug.cgi?id=58124
- Added entire HARLog to test
- Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms
* http/tests/inspector/resource-har-conversion-expected.txt:
* http/tests/inspector/resource-har-conversion.html:
* http/tests/inspector/resources-test.js:
* platform/mac-wk2/http/tests/inspector/resource-har-conversion-expected.txt: Removed.
2011-04-08 Sergio Villar Senin <svillar@igalia.com>
 
Unreviewed, added new GTK+ test expectations.
......@@ -2,167 +2,185 @@ Tests conversion of Inspector's resource representation into HAR format.
Page reloaded.
{
0 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/inspector-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "a"
value : "b"
path : "/path"
domain : "example.com"
expires : null
httpOnly : false
secure : false
version : <string>
creator : {
name : "WebInspector"
version : <string>
}
pages : {
0 : {
startedDateTime : <object>
id : <string>
title : ""
pageTimings : {
onContentLoad : <number>
onLoad : <number>
}
}
}
entries : {
0 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/inspector-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "a"
value : "b"
path : "/path"
domain : "example.com"
expires : null
httpOnly : false
secure : false
}
1 : {
name : "a1"
value : "b1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
2 : {
name : "c1"
value : "d1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
}
1 : {
name : "a1"
value : "b1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
}
2 : {
name : "c1"
value : "d1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
redirectURL : ""
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "x"
value : "y"
path : "/path"
domain : "example.com"
expires : null
httpOnly : true
secure : true
}
1 : {
name : "x1"
value : "y1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
2 : {
name : "z2"
value : "y2"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
}
}
timings : <object>
}
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
1 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
headers : <object>
headersSize : -1
bodySize : <number>
}
redirectURL : ""
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "x"
value : "y"
path : "/path"
domain : "example.com"
expires : null
httpOnly : true
secure : true
}
1 : {
name : "x1"
value : "y1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
2 : {
name : "z2"
value : "y2"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "text/html"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
timings : <object>
}
1 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
headers : <object>
headersSize : -1
bodySize : <number>
}
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "text/html"
2 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resources-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
2 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resources-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
}
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
redirectURL : ""
headersSize : -1
bodySize : <number>
timings : <object>
}
timings : <object>
}
3 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "POST"
url : "http://127.0.0.1:8000/inspector/resources/post-target.cgi"
headers : <object>
headersSize : -1
bodySize : <number>
postData : {
mimeType : "text/xml"
text : "<xml></xml>"
3 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "POST"
url : "http://127.0.0.1:8000/inspector/resources/post-target.cgi"
headers : <object>
headersSize : -1
bodySize : <number>
postData : {
mimeType : "text/xml"
text : "<xml></xml>"
}
}
}
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "application/xml"
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "application/xml"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
redirectURL : ""
headersSize : -1
bodySize : <number>
timings : <object>
}
timings : <object>
}
}
......@@ -43,9 +43,14 @@ var test = function()
}
addCookieHeadersToResource(findResourceByURL(/inspector-test\.js$/));
var entries = (new WebInspector.HARLog()).build().entries;
entries.sort(InspectorTest.resourceURLComparer);
InspectorTest.addObject(entries, InspectorTest.HARNondeterministicPropertiesWithSize);
var log = (new WebInspector.HARLog()).build();
// Filter out favicon.ico requests that only appear on certain platforms.
log.entries = log.entries.filter(function(entry) {
return !/favicon\.ico$/.test(entry.request.url);
});
log.entries.sort(InspectorTest.resourceURLComparer);
InspectorTest.addObject(log, InspectorTest.HARNondeterministicPropertiesWithSize);
var pageTimings = log.pages[0].pageTimings;
InspectorTest.completeTest();
}
}
......
......@@ -7,6 +7,11 @@ InspectorTest.HARNondeterministicProperties = {
receive: 1,
headers: 1,
timings: 1,
version: 1,
startedDateTime: 1,
id: 1,
onContentLoad: 1,
onLoad: 1
};
// addObject checks own properties only, so make a deep copy rather than use prototype.
......
Tests conversion of Inspector's resource representation into HAR format.
Page reloaded.
{
0 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/favicon.ico"
headers : <object>
headersSize : -1
bodySize : <number>
}
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "image/x-icon"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
1 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/inspector-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "a"
value : "b"
path : "/path"
domain : "example.com"
expires : null
httpOnly : false
secure : false
}
1 : {
name : "a1"
value : "b1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
2 : {
name : "c1"
value : "d1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
}
}
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
cookies : {
0 : {
name : "x"
value : "y"
path : "/path"
domain : "example.com"
expires : null
httpOnly : true
secure : true
}
1 : {
name : "x1"
value : "y1"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
2 : {
name : "z2"
value : "y2"
path : undefined
domain : undefined
expires : null
httpOnly : false
secure : false
}
}
}
timings : <object>
}
2 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
headers : <object>
headersSize : -1
bodySize : <number>
}
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "text/html"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
3 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "GET"
url : "http://127.0.0.1:8000/inspector/resources-test.js"
headers : <object>
headersSize : -1
bodySize : <number>
}
response : {
status : 304
statusText : "Not Modified"
headers : <object>
content : {
size : <number>
mimeType : "application/x-javascript"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
4 : {
pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
startedDateTime : <object>
time : <number>
request : {
method : "POST"
url : "http://127.0.0.1:8000/inspector/resources/post-target.cgi"
headers : <object>
headersSize : -1
bodySize : <number>
postData : {
mimeType : "text/xml"
text : "<xml></xml>"
}
}
response : {
status : 200
statusText : "OK"
headers : <object>
content : {
size : <number>
mimeType : "application/xml"
}
redirectURL : ""
headersSize : -1
bodySize : <number>
}
timings : <object>
}
}
2011-04-08 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: HAR compliance fixes
https://bugs.webkit.org/show_bug.cgi?id=58124
- Always provide some values for queryString and cookies, even though arrays may be empty
- Always provide an empty cache object
- Added entire HARLog to test
- Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
* inspector/front-end/HAREntry.js:
(WebInspector.HAREntry.prototype.build):
(WebInspector.HAREntry.prototype._buildRequest):
(WebInspector.HAREntry.prototype._buildResponse):
2011-04-08 Adam Barth <abarth@webkit.org>
 
Attempt to fix the Qt build.
......@@ -31,6 +31,9 @@
// See http://groups.google.com/group/http-archive-specification/web/har-1-2-spec
// for HAR specification.
// FIXME: Some fields are not yet supported due to back-end limitations.
// See https://bugs.webkit.org/show_bug.cgi?id=58127 for details.
WebInspector.HAREntry = function(resource)
{
this._resource = resource;
......@@ -45,7 +48,7 @@ WebInspector.HAREntry.prototype = {