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

Unified Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 10825317: Convert banned calls to use Navigate in ash app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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/ui/browser_navigator.cc ('k') | ui/app_list/app_list_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator_browsertest.cc
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 9bee0f58660147bc823269232d85175de08c14a1..90ed70750dfda32dbb187eeecbecf2bc05b66dc2 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -1227,6 +1227,24 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
chrome::GetActiveWebContents(browser())->GetURL());
}
+IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
+ NavigateWithoutBrowser) {
+ // First navigate using the profile of the existing browser window, and
+ // check that the window is reused.
+ chrome::NavigateParams params(browser()->profile(), GetGoogleURL(),
+ content::PAGE_TRANSITION_LINK);
+ ui_test_utils::NavigateToURL(&params);
+ EXPECT_EQ(1u, BrowserList::size());
+
+ // Now navigate using the incognito profile and check that a new window
+ // is created.
+ chrome::NavigateParams params_incognito(
+ browser()->profile()->GetOffTheRecordProfile(),
+ GetGoogleURL(), content::PAGE_TRANSITION_LINK);
+ ui_test_utils::NavigateToURL(&params_incognito);
+ EXPECT_EQ(2u, BrowserList::size());
+}
+
// This test makes sure any link in a crashed panel page navigates to a tabbed
// window.
class PanelBrowserNavigatorTest : public BrowserNavigatorTest {
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | ui/app_list/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698