OLD | NEW |
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" | 8 #include "chrome/common/chrome_switches.h" |
9 #include "chrome/browser/chromeos/login/login_utils.h" | 9 #include "chrome/browser/chromeos/login/login_utils.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
12 #include "chrome/browser/ui/browser_navigator.h" | 12 #include "chrome/browser/ui/browser_navigator.h" |
| 13 #include "chrome/browser/ui/browser_tabstrip.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 GURL GetGoogleURL() { | 19 GURL GetGoogleURL() { |
19 return GURL("http://www.google.com/"); | 20 return GURL("http://www.google.com/"); |
20 } | 21 } |
21 | 22 |
22 // Subclass that tests navigation while in the Guest session. | 23 // Subclass that tests navigation while in the Guest session. |
(...skipping 24 matching lines...) Expand all Loading... |
47 p.url = GURL("chrome://chrome/settings"); | 48 p.url = GURL("chrome://chrome/settings"); |
48 p.window_action = browser::NavigateParams::SHOW_WINDOW; | 49 p.window_action = browser::NavigateParams::SHOW_WINDOW; |
49 p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 50 p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
50 browser::Navigate(&p); | 51 browser::Navigate(&p); |
51 | 52 |
52 // Settings page should be opened in incognito window. | 53 // Settings page should be opened in incognito window. |
53 EXPECT_NE(browser(), p.browser); | 54 EXPECT_NE(browser(), p.browser); |
54 EXPECT_EQ(incognito_browser, p.browser); | 55 EXPECT_EQ(incognito_browser, p.browser); |
55 EXPECT_EQ(2, incognito_browser->tab_count()); | 56 EXPECT_EQ(2, incognito_browser->tab_count()); |
56 EXPECT_EQ(GURL("chrome://chrome/settings"), | 57 EXPECT_EQ(GURL("chrome://chrome/settings"), |
57 incognito_browser->GetActiveWebContents()->GetURL()); | 58 chrome::GetActiveWebContents(incognito_browser)->GetURL()); |
58 } | 59 } |
59 | 60 |
60 } // namespace | 61 } // namespace |
OLD | NEW |