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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 3834002: Make all browser code use browser::Navigate to open tabs.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/in_process_browser_test.cc
===================================================================
--- chrome/test/in_process_browser_test.cc (revision 64601)
+++ chrome/test/in_process_browser_test.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/test/test_file_util.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
+#include "chrome/browser/browser_navigator.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/browser_thread.h"
@@ -269,6 +270,24 @@
RenderProcessHost::set_run_renderer_in_process(original_single_process_);
}
+void InProcessBrowserTest::AddTabAtIndexToBrowser(
+ Browser* browser,
+ int index,
+ const GURL& url,
+ PageTransition::Type transition) {
+ browser::NavigateParams params(browser, url, transition);
+ params.tabstrip_index = index;
+ params.disposition = NEW_FOREGROUND_TAB;
+ browser::Navigate(&params);
+}
+
+void InProcessBrowserTest::AddTabAtIndex(
+ int index,
+ const GURL& url,
+ PageTransition::Type transition) {
+ AddTabAtIndexToBrowser(browser(), index, url, transition);
+}
+
// Creates a browser with a single tab (about:blank), waits for the tab to
// finish loading and shows the browser.
Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698