Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 8632006: Allow POST method when converting file protocol to http protocol for layout tests. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index a3e0f64aa7eec11086e9e4dffbe3332760b42a02..19f0283cac22b986fcd51d3bcd8399a7e5b22daf 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -585,15 +585,13 @@ class RequestProxy : public net::URLRequest::Delegate,
if (!g_file_over_http_params || !params->url.SchemeIsFile())
return;
- // For file protocol, method must be GET or NULL.
- DCHECK(params->method == "GET" || params->method.empty());
- // File protocol doesn't support upload.
- DCHECK(!params->upload);
- DCHECK(params->referrer.is_empty());
+ // For file protocol, method must be GET, POST or NULL.
+ DCHECK(params->method == "GET" || params->method == "POST" ||
+ params->method.empty());
DCHECK(!params->download_to_file);
- // "GET" is the only method we allow.
- params->method = "GET";
+ if (params->method.empty())
+ params->method = "GET";
std::string original_request = params->url.spec();
std::string::size_type found =
original_request.find(g_file_over_http_params->file_path_template);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698