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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 browser()->host_desktop_type())); | 173 browser()->host_desktop_type())); |
174 ASSERT_TRUE(popup->is_type_popup()); | 174 ASSERT_TRUE(popup->is_type_popup()); |
175 ASSERT_EQ(popup, observer.added_browser_); | 175 ASSERT_EQ(popup, observer.added_browser_); |
176 | 176 |
177 CommandLine dummy(CommandLine::NO_PROGRAM); | 177 CommandLine dummy(CommandLine::NO_PROGRAM); |
178 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? | 178 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? |
179 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; | 179 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; |
180 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run); | 180 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run); |
181 // This should create a new window, but re-use the profile from |popup|. If | 181 // This should create a new window, but re-use the profile from |popup|. If |
182 // it used a NULL or invalid profile, it would crash. | 182 // it used a NULL or invalid profile, it would crash. |
183 launch.OpenURLsInBrowser(popup, false, urls, | 183 launch.OpenURLsInBrowser(popup, false, urls, chrome::GetActiveDesktop()); |
184 chrome::HOST_DESKTOP_TYPE_NATIVE); | |
185 ASSERT_NE(popup, observer.added_browser_); | 184 ASSERT_NE(popup, observer.added_browser_); |
186 BrowserList::RemoveObserver(&observer); | 185 BrowserList::RemoveObserver(&observer); |
187 } | 186 } |
188 | 187 |
189 // We don't do non-process-startup browser launches on ChromeOS. | 188 // We don't do non-process-startup browser launches on ChromeOS. |
190 // Session restore for process-startup browser launches is tested | 189 // Session restore for process-startup browser launches is tested |
191 // in session_restore_uitest. | 190 // in session_restore_uitest. |
192 #if !defined(OS_CHROMEOS) | 191 #if !defined(OS_CHROMEOS) |
193 // Verify that startup URLs are honored when the process already exists but has | 192 // Verify that startup URLs are honored when the process already exists but has |
194 // no tabbed browser windows (eg. as if the process is running only due to a | 193 // no tabbed browser windows (eg. as if the process is running only due to a |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 ASSERT_EQ(1, tab_strip->count()); | 1344 ASSERT_EQ(1, tab_strip->count()); |
1346 EXPECT_EQ("title1.html", | 1345 EXPECT_EQ("title1.html", |
1347 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1346 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1348 } | 1347 } |
1349 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1348 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
1350 | 1349 |
1351 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1350 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
1352 // defined(ENABLE_CONFIGURATION_POLICY) | 1351 // defined(ENABLE_CONFIGURATION_POLICY) |
1353 | 1352 |
1354 #endif // !defined(OS_CHROMEOS) | 1353 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |