summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/base/ui_test_utils.cc8
-rw-r--r--chrome/test/base/ui_test_utils.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 4f65067..88c1e43 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -163,6 +163,14 @@ void NavigateToURL(chrome::NavigateParams* params) {
content::WaitForLoadStop(params->target_contents);
}
+
+void NavigateToURLWithPost(Browser* browser, const GURL& url) {
+ chrome::NavigateParams params(browser, url,
+ content::PAGE_TRANSITION_FORM_SUBMIT);
+ params.uses_post = true;
+ NavigateToURL(&params);
+}
+
void NavigateToURL(Browser* browser, const GURL& url) {
NavigateToURLWithDisposition(browser, url, CURRENT_TAB,
BROWSER_TEST_WAIT_FOR_NAVIGATION);
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index 60de349..b7fe6da 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -88,6 +88,10 @@ Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url);
void NavigateToURL(chrome::NavigateParams* params);
// Navigates the selected tab of |browser| to |url|, blocking until the
+// navigation finishes. Simulates a POST and uses chrome::Navigate.
+void NavigateToURLWithPost(Browser* browser, const GURL& url);
+
+// Navigates the selected tab of |browser| to |url|, blocking until the
// navigation finishes. Uses Browser::OpenURL --> chrome::Navigate.
void NavigateToURL(Browser* browser, const GURL& url);