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

Unified Diff: chrome/test/browser_with_test_window_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/browser/views/find_bar_host_interactive_uitest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/browser_with_test_window_test.cc
===================================================================
--- chrome/test/browser_with_test_window_test.cc (revision 64601)
+++ chrome/test/browser_with_test_window_test.cc (working copy)
@@ -9,6 +9,7 @@
#endif // defined(OS_WIN)
#include "chrome/browser/browser.h"
+#include "chrome/browser/browser_navigator.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -60,10 +61,11 @@
}
void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
- Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
- params.index = 0;
- TabContents* contents = browser->AddTabWithURL(&params);
- CommitPendingLoad(&contents->controller());
+ browser::NavigateParams params(browser, url, PageTransition::TYPED);
+ params.tabstrip_index = 0;
+ params.disposition = NEW_FOREGROUND_TAB;
+ browser::Navigate(&params);
+ CommitPendingLoad(&params.target_contents->controller());
}
void BrowserWithTestWindowTest::CommitPendingLoad(
« no previous file with comments | « chrome/browser/views/find_bar_host_interactive_uitest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698