[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
caseq at chromium.org
caseq at chromium.org
Wed Dec 22 12:56:41 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit dc82760f36c5eab647a7495a47ca35764df57fbb
Author: caseq at chromium.org <caseq at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 2 15:29:03 2010 +0000
2010-09-02 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: HAR converter fails on POST requests with non-form content type.
https://bugs.webkit.org/show_bug.cgi?id=45109
* inspector/front-end/HAREntry.js:
(WebInspector.HAREntry.prototype._buildPostData):
2010-09-02 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: HAR converter fails on POST requests with non-form content type.
Migrated HAR tests to inspector-test2.js, enabled resource tracking, added test for XHR POST request.
https://bugs.webkit.org/show_bug.cgi?id=45109
* http/tests/inspector/resource-har-conversion-expected.txt:
* http/tests/inspector/resource-har-conversion.html:
* http/tests/inspector/resource-parameters-expected.txt:
* http/tests/inspector/resource-test2.js: Added.
(initialize_ResourceTest.InspectorTest.resourceURLComparer):
(initialize_ResourceTest):
* platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt:
* platform/chromium-win/http/tests/inspector/resource-har-conversion-expected.txt: Added.
* platform/win/http/tests/inspector/console-xhr-logging-expected.txt: Added.
* platform/win/http/tests/inspector/resource-har-conversion-expected.txt: Added.
* platform/win/http/tests/inspector/resource-parameters-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cb8fb5c..d91a054 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-02 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: HAR converter fails on POST requests with non-form content type.
+ Migrated HAR tests to inspector-test2.js, enabled resource tracking, added test for XHR POST request.
+ https://bugs.webkit.org/show_bug.cgi?id=45109
+
+ * http/tests/inspector/resource-har-conversion-expected.txt:
+ * http/tests/inspector/resource-har-conversion.html:
+ * http/tests/inspector/resource-parameters-expected.txt:
+ * http/tests/inspector/resource-test2.js: Added.
+ (initialize_ResourceTest.InspectorTest.resourceURLComparer):
+ (initialize_ResourceTest):
+ * platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt:
+ * platform/chromium-win/http/tests/inspector/resource-har-conversion-expected.txt: Added.
+ * platform/win/http/tests/inspector/console-xhr-logging-expected.txt: Added.
+ * platform/win/http/tests/inspector/resource-har-conversion-expected.txt: Added.
+ * platform/win/http/tests/inspector/resource-parameters-expected.txt:
+
2010-09-02 Peter Kasting <pkasting at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt b/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
index fec71ce..eaad6e6 100644
--- a/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
+++ b/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
@@ -1,9 +1,43 @@
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 : <string>
+ startedDateTime : <object>
+ time : <number>
+ request : {
+ method : "GET"
+ url : "http://127.0.0.1:8000/inspector/inspector-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 1 : {
+ pageref : "http://127.0.0.1:8000/inspector/resource-har-conversion.html"
+ startedDateTime : <object>
time : <number>
request : {
method : "GET"
@@ -17,12 +51,82 @@ Tests conversion of Inspector's resource representation into HAR format.
statusText : "OK"
headers : <object>
content : {
- size : 778
+ size : 1137
+ mimeType : "text/html"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 1137
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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/xhr-does-not-exist.html"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ postData : {
+ mimeType : "text/xml"
+ text : "<xml></xml>"
+ }
+ }
+ response : {
+ status : 404
+ statusText : "Not Found"
+ headers : <object>
+ content : {
+ size : 355
mimeType : "text/html"
}
redirectURL : ""
headersSize : -1
- bodySize : 778
+ bodySize : 355
}
timings : {
blocked : -1
diff --git a/LayoutTests/http/tests/inspector/resource-har-conversion.html b/LayoutTests/http/tests/inspector/resource-har-conversion.html
index b551ae2..09c802a 100644
--- a/LayoutTests/http/tests/inspector/resource-har-conversion.html
+++ b/LayoutTests/http/tests/inspector/resource-har-conversion.html
@@ -1,37 +1,43 @@
<html>
<head>
-<script src="inspector-test.js"></script>
-<script src="resource-tests.js"></script>
+<script src="resource-test2.js"></script>
+<script src="inspector-test2.js"></script>
<script>
-function doit()
-{
- dumpResources();
-}
-function dumpResources() {
- function callback(result)
+var test = function()
+{
+ function getHAR(id)
{
- dumpObject(result.sort(resourceURLComparer), HARNondeterministicProperties);
- notifyDone();
+ return new WebInspector.HAREntry(WebInspector.resources[id]).build();
}
- evaluateInWebInspector("frontend_dumpResources", callback);
+ InspectorTest.enableResourceTracking(function() {
+ InjectedScriptAccess.getDefault().evaluate("doXHR()", "console", function() {
+ var resources = Object.keys(WebInspector.resources).map(getHAR).sort(InspectorTest.resourceURLComparer);
+ InspectorTest.addObject(resources, InspectorTest.HARNondeterministicProperties);
+ InspectorTest.disableResourceTracking();
+ InspectorTest.completeTest();
+ });
+ });
}
-// Frontend functions.
+// Make a POST requests to see we handle non-post form data well.
-function frontend_dumpResources()
+function doXHR()
{
- var result = [];
- for (var resource in WebInspector.resources)
- result.push(new WebInspector.HAREntry(WebInspector.resources[resource]).build());
- return result;
+ var xhr = new XMLHttpRequest();
+ xhr.open("POST", "resources/xhr-does-not-exist.html", false);
+ xhr.setRequestHeader("Content-Type", "text/xml");
+ xhr.send("<xml></xml>");
}
+
</script>
+
+
</head>
-<body onload="onload()">
+<body onload="runTest()">
<p>
Tests conversion of Inspector's resource representation into HAR format.
</p>
diff --git a/LayoutTests/http/tests/inspector/resource-parameters-expected.txt b/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
index 0ac83b1..38c4d4f 100644
--- a/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
+++ b/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
@@ -24,6 +24,7 @@ Tests that resources panel shows form data parameters.
}
postData : {
mimeType : "application/x-www-form-urlencoded"
+ text : "formParam1=formValue1&formParam2="
params : {
0 : {
name : "formParam1"
@@ -34,7 +35,6 @@ Tests that resources panel shows form data parameters.
value : ""
}
}
- text : "formParam1=formValue1&formParam2="
}
}
response : {
diff --git a/LayoutTests/http/tests/inspector/resource-test2.js b/LayoutTests/http/tests/inspector/resource-test2.js
new file mode 100755
index 0000000..44726c5
--- /dev/null
+++ b/LayoutTests/http/tests/inspector/resource-test2.js
@@ -0,0 +1,16 @@
+var initialize_ResourceTest = function() {
+
+InspectorTest.HARNondeterministicProperties = {
+ startedDateTime: 1,
+ time: 1,
+ wait: 1,
+ receive: 1,
+ headers: 1,
+};
+
+InspectorTest.resourceURLComparer = function(r1, r2)
+{
+ return r1.request.url.localeCompare(r2.request.url);
+}
+
+}
diff --git a/LayoutTests/platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt b/LayoutTests/platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt
index 0ac83b1..38c4d4f 100644
--- a/LayoutTests/platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt
+++ b/LayoutTests/platform/chromium-win/http/tests/inspector/resource-parameters-expected.txt
@@ -24,6 +24,7 @@ Tests that resources panel shows form data parameters.
}
postData : {
mimeType : "application/x-www-form-urlencoded"
+ text : "formParam1=formValue1&formParam2="
params : {
0 : {
name : "formParam1"
@@ -34,7 +35,6 @@ Tests that resources panel shows form data parameters.
value : ""
}
}
- text : "formParam1=formValue1&formParam2="
}
}
response : {
diff --git a/LayoutTests/platform/chromium-win/inspector/resource-har-conversion-expected.txt b/LayoutTests/platform/chromium-win/inspector/resource-har-conversion-expected.txt
new file mode 100755
index 0000000..98d01de
--- /dev/null
+++ b/LayoutTests/platform/chromium-win/inspector/resource-har-conversion-expected.txt
@@ -0,0 +1,142 @@
+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-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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 : -1
+ }
+ response : {
+ status : 200
+ statusText : "OK"
+ headers : <object>
+ content : {
+ size : 1137
+ mimeType : "text/html"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 1137
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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/xhr-does-not-exist.html"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ postData : {
+ mimeType : "text/xml"
+ text : "<xml></xml>"
+ }
+ }
+ response : {
+ status : 404
+ statusText : "Not Found"
+ headers : <object>
+ content : {
+ size : 305
+ mimeType : "text/html"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 305
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+}
+
diff --git a/LayoutTests/platform/win/http/tests/inspector/console-xhr-logging-expected.txt b/LayoutTests/platform/win/http/tests/inspector/console-xhr-logging-expected.txt
new file mode 100644
index 0000000..c31ca71
--- /dev/null
+++ b/LayoutTests/platform/win/http/tests/inspector/console-xhr-logging-expected.txt
@@ -0,0 +1,26 @@
+CONSOLE MESSAGE: line 11: enabled
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 21: disabled
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+Tests that XMLHttpRequest Logging works when Enabled and doesn't show logs when Disabled.
+
+console-xhr-logging.html:11enabled
+console-xhr-logging.html:40sending a GET request to resources/xhr-exists.html
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html".
+console-xhr-logging.html:40sending a GET request to resources/xhr-does-not-exist.html
+resources/xhr-does-not-exist.htmlFailed to load resource: the server responded with a status of 404 (Not Found)
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html".
+console-xhr-logging.html:40sending a POST request to resources/xhr-exists.html
+resources/xhr-exists.htmlFailed to load resource: the server responded with a status of 405 (Method Not Allowed)
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html".
+console-xhr-logging.html:21disabled
+console-xhr-logging.html:40sending a GET request to resources/xhr-exists.html
+console-xhr-logging.html:40sending a GET request to resources/xhr-does-not-exist.html
+resources/xhr-does-not-exist.htmlFailed to load resource: the server responded with a status of 404 (Not Found)
+console-xhr-logging.html:40sending a POST request to resources/xhr-exists.html
+resources/xhr-exists.htmlFailed to load resource: the server responded with a status of 405 (Method Not Allowed)
+
diff --git a/LayoutTests/platform/win/http/tests/inspector/resource-har-conversion-expected.txt b/LayoutTests/platform/win/http/tests/inspector/resource-har-conversion-expected.txt
new file mode 100755
index 0000000..98d01de
--- /dev/null
+++ b/LayoutTests/platform/win/http/tests/inspector/resource-har-conversion-expected.txt
@@ -0,0 +1,142 @@
+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-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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 : -1
+ }
+ response : {
+ status : 200
+ statusText : "OK"
+ headers : <object>
+ content : {
+ size : 1137
+ mimeType : "text/html"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 1137
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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-test2.js"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ }
+ response : {
+ status : 304
+ statusText : "Not Modified"
+ headers : <object>
+ content : {
+ size : 0
+ mimeType : "application/x-javascript"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 0
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+ 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/xhr-does-not-exist.html"
+ headers : <object>
+ headersSize : -1
+ bodySize : -1
+ postData : {
+ mimeType : "text/xml"
+ text : "<xml></xml>"
+ }
+ }
+ response : {
+ status : 404
+ statusText : "Not Found"
+ headers : <object>
+ content : {
+ size : 305
+ mimeType : "text/html"
+ }
+ redirectURL : ""
+ headersSize : -1
+ bodySize : 305
+ }
+ timings : {
+ blocked : -1
+ dns : -1
+ connect : -1
+ send : -1
+ wait : <number>
+ receive : <number>
+ ssl : -1
+ }
+ }
+}
+
diff --git a/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt b/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
index bb2de86..5e8f120 100644
--- a/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
+++ b/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
@@ -24,6 +24,7 @@ Tests that resources panel shows form data parameters.
}
postData : {
mimeType : "application/x-www-form-urlencoded"
+ text : "formParam1=formValue1&formParam2="
params : {
0 : {
name : "formParam1"
@@ -34,7 +35,6 @@ Tests that resources panel shows form data parameters.
value : ""
}
}
- text : "formParam1=formValue1&formParam2="
}
}
response : {
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 44b15f4..ccb2831 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-02 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: HAR converter fails on POST requests with non-form content type
+ https://bugs.webkit.org/show_bug.cgi?id=45109
+
+ * inspector/front-end/HAREntry.js:
+ (WebInspector.HAREntry.prototype._buildPostData):
+
2010-09-02 Andreas Kling <andreas.kling at nokia.com>
Rubber-stamped by Simon Hausmann.
diff --git a/WebCore/inspector/front-end/HAREntry.js b/WebCore/inspector/front-end/HAREntry.js
index c06e64f..9f188ed 100644
--- a/WebCore/inspector/front-end/HAREntry.js
+++ b/WebCore/inspector/front-end/HAREntry.js
@@ -116,11 +116,13 @@ WebInspector.HAREntry.prototype = {
_buildPostData: function()
{
- return {
+ var res = {
mimeType: this._resource.requestHeaderValue("Content-Type"),
- params: this._buildParameters(this._resource.formParameters),
text: this._resource.requestFormData
};
+ if (this._resource.formParameters)
+ res.params = this._buildParameters(this._resource.formParameters);
+ return res;
},
_buildParameters: function(parameters)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list