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

Unified Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New OpenURL function and DataType Test Created 8 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
Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 5f3705bf1ef0be6691cc8db55961f6a52c3874cd..bd2f8b976314dd434317ff06f3fea013e14e9c12 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -467,13 +467,12 @@ TEST_F(NavigationControllerTest, LoadURLWithExtraParams_HttpPost) {
load_params.override_user_agent = NavigationController::UA_OVERRIDE_TRUE;
- const unsigned char* raw_data =
- reinterpret_cast<const unsigned char*>("d\n\0a2");
+ const char* raw_data = "d\n\0a2";
const int length = 5;
- std::vector<unsigned char> post_data_vector(raw_data, raw_data+length);
- scoped_refptr<base::RefCountedBytes> data =
- base::RefCountedBytes::TakeVector(&post_data_vector);
- load_params.browser_initiated_post_data = data.get();
+ scoped_refptr<webkit_glue::ResourceRequestBody> data =
+ new webkit_glue::ResourceRequestBody();
+ data->AppendBytes(raw_data, length);
+ load_params.browser_initiated_post_data = data;
controller.LoadURLWithParams(load_params);
NavigationEntryImpl* entry =

Powered by Google App Engine
This is Rietveld 408576698