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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest_chromeos.cc

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/browser/chromeos/login/login_utils.h" 8 #include "chrome/browser/chromeos/login/login_utils.h"
10 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
12 #include "chrome/browser/ui/browser_navigator.h" 11 #include "chrome/browser/ui/browser_navigator.h"
13 #include "chrome/browser/ui/browser_tabstrip.h" 12 #include "chrome/browser/ui/browser_tabstrip.h"
13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 16
17 namespace { 17 namespace {
18 18
19 GURL GetGoogleURL() { 19 GURL GetGoogleURL() {
20 return GURL("http://www.google.com/"); 20 return GURL("http://www.google.com/");
21 } 21 }
22 22
23 // Subclass that tests navigation while in the Guest session. 23 // Subclass that tests navigation while in the Guest session.
(...skipping 12 matching lines...) Expand all
36 // in Guest Session (as well as all other windows in Guest session). 36 // in Guest Session (as well as all other windows in Guest session).
37 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest, 37 IN_PROC_BROWSER_TEST_F(BrowserGuestSessionNavigatorTest,
38 Disposition_Settings_UseIncognitoWindow) { 38 Disposition_Settings_UseIncognitoWindow) {
39 Browser* incognito_browser = CreateIncognitoBrowser(); 39 Browser* incognito_browser = CreateIncognitoBrowser();
40 40
41 EXPECT_EQ(2u, BrowserList::size()); 41 EXPECT_EQ(2u, BrowserList::size());
42 EXPECT_EQ(1, browser()->tab_count()); 42 EXPECT_EQ(1, browser()->tab_count());
43 EXPECT_EQ(1, incognito_browser->tab_count()); 43 EXPECT_EQ(1, incognito_browser->tab_count());
44 44
45 // Navigate to the settings page. 45 // Navigate to the settings page.
46 browser::NavigateParams p(MakeNavigateParams(incognito_browser)); 46 chrome::NavigateParams p(MakeNavigateParams(incognito_browser));
47 p.disposition = SINGLETON_TAB; 47 p.disposition = SINGLETON_TAB;
48 p.url = GURL("chrome://chrome/settings"); 48 p.url = GURL("chrome://chrome/settings");
49 p.window_action = browser::NavigateParams::SHOW_WINDOW; 49 p.window_action = chrome::NavigateParams::SHOW_WINDOW;
50 p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; 50 p.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE;
51 browser::Navigate(&p); 51 chrome::Navigate(&p);
52 52
53 // Settings page should be opened in incognito window. 53 // Settings page should be opened in incognito window.
54 EXPECT_NE(browser(), p.browser); 54 EXPECT_NE(browser(), p.browser);
55 EXPECT_EQ(incognito_browser, p.browser); 55 EXPECT_EQ(incognito_browser, p.browser);
56 EXPECT_EQ(2, incognito_browser->tab_count()); 56 EXPECT_EQ(2, incognito_browser->tab_count());
57 EXPECT_EQ(GURL("chrome://chrome/settings"), 57 EXPECT_EQ(GURL("chrome://chrome/settings"),
58 chrome::GetActiveWebContents(incognito_browser)->GetURL()); 58 chrome::GetActiveWebContents(incognito_browser)->GetURL());
59 } 59 }
60 60
61 } // namespace 61 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/browser_tabstrip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698