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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK_IMPLIES(method == "POST", url.SchemeIs(http or https)). Created 4 years, 7 months 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: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index bca013bb75a9f472b054d5f1647b23d37a84270b..b60ecf9323e138be63563ad3a569500bca44485e 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -16,6 +16,7 @@
#include "base/files/file_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_memory.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -155,7 +156,12 @@ void NavigateToURL(chrome::NavigateParams* params) {
void NavigateToURLWithPost(Browser* browser, const GURL& url) {
chrome::NavigateParams params(browser, url,
ui::PAGE_TRANSITION_FORM_SUBMIT);
+
+ std::string post_data("test=body");
+ params.browser_initiated_post_data =
+ base::RefCountedString::TakeString(&post_data);
params.uses_post = true;
+
NavigateToURL(&params);
}
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.h » ('j') | content/public/browser/navigation_handle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698