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 "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 10 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 Browser* browser) const { | 72 Browser* browser) const { |
73 chrome::NavigateParams params(browser, GetGoogleURL(), | 73 chrome::NavigateParams params(browser, GetGoogleURL(), |
74 content::PAGE_TRANSITION_LINK); | 74 content::PAGE_TRANSITION_LINK); |
75 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 75 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
76 return params; | 76 return params; |
77 } | 77 } |
78 | 78 |
79 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type, | 79 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type, |
80 Profile* profile) { | 80 Profile* profile) { |
81 Browser* browser = new Browser( | 81 Browser* browser = new Browser( |
82 Browser::CreateParams(type, profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); | 82 Browser::CreateParams(type, profile, chrome::GetActiveDesktop())); |
83 chrome::AddBlankTabAt(browser, -1, true); | 83 chrome::AddBlankTabAt(browser, -1, true); |
84 return browser; | 84 return browser; |
85 } | 85 } |
86 | 86 |
87 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type, | 87 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type, |
88 Profile* profile) { | 88 Profile* profile) { |
89 Browser* browser = new Browser( | 89 Browser* browser = new Browser( |
90 Browser::CreateParams::CreateForApp( | 90 Browser::CreateParams::CreateForApp( |
91 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile, | 91 Browser::TYPE_POPUP, "Test", gfx::Rect(), profile, |
92 chrome::HOST_DESKTOP_TYPE_NATIVE)); | 92 chrome::GetActiveDesktop())); |
93 chrome::AddBlankTabAt(browser, -1, true); | 93 chrome::AddBlankTabAt(browser, -1, true); |
94 return browser; | 94 return browser; |
95 } | 95 } |
96 | 96 |
97 WebContents* BrowserNavigatorTest::CreateWebContents() { | 97 WebContents* BrowserNavigatorTest::CreateWebContents() { |
98 content::WebContents::CreateParams create_params(browser()->profile()); | 98 content::WebContents::CreateParams create_params(browser()->profile()); |
99 content::WebContents* base_web_contents = | 99 content::WebContents* base_web_contents = |
100 browser()->tab_strip_model()->GetActiveWebContents(); | 100 browser()->tab_strip_model()->GetActiveWebContents(); |
101 if (base_web_contents) { | 101 if (base_web_contents) { |
102 create_params.initial_size = | 102 create_params.initial_size = |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 ui_test_utils::NavigateToURL(&viewsource_params); | 1285 ui_test_utils::NavigateToURL(&viewsource_params); |
1286 | 1286 |
1287 chrome::NavigateParams singleton_params(browser(), | 1287 chrome::NavigateParams singleton_params(browser(), |
1288 GURL(chrome::kChromeUIVersionURL), | 1288 GURL(chrome::kChromeUIVersionURL), |
1289 content::PAGE_TRANSITION_LINK); | 1289 content::PAGE_TRANSITION_LINK); |
1290 singleton_params.disposition = SINGLETON_TAB; | 1290 singleton_params.disposition = SINGLETON_TAB; |
1291 EXPECT_EQ(-1, chrome::GetIndexOfSingletonTab(&singleton_params)); | 1291 EXPECT_EQ(-1, chrome::GetIndexOfSingletonTab(&singleton_params)); |
1292 } | 1292 } |
1293 | 1293 |
1294 } // namespace | 1294 } // namespace |
OLD | NEW |