Skip to content
Permalink
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.


Canonical link: https://commits.webkit.org/73053@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
caseq committed Apr 8, 2011
1 parent 97e2a2d commit bf6cbb55c84337060813226fb28d6c393fbf9e80
Showing 7 changed files with 217 additions and 351 deletions.
@@ -1,3 +1,18 @@
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 @@
}

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.

0 comments on commit bf6cbb5

Please sign in to comment.