OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/callback_list.h" | 5 #include "base/callback_list.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // This should have created a new browser window. | 168 // This should have created a new browser window. |
169 Browser* new_browser = FindOneOtherBrowser(browser()); | 169 Browser* new_browser = FindOneOtherBrowser(browser()); |
170 ASSERT_TRUE(new_browser); | 170 ASSERT_TRUE(new_browser); |
171 | 171 |
172 // Verify that only the first-run tabs are shown. | 172 // Verify that only the first-run tabs are shown. |
173 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 173 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
174 ASSERT_EQ(2, tab_strip->count()); | 174 ASSERT_EQ(2, tab_strip->count()); |
175 | 175 |
176 GURL expected_first_tab_url = | 176 GURL expected_first_tab_url = |
177 signin::ShouldShowPromoAtStartup(browser()->profile(), true) | 177 signin::ShouldShowPromoAtStartup(browser()->profile(), true) |
178 ? signin::GetPromoURL(signin_metrics::SOURCE_START_PAGE, false) | 178 ? signin::GetPromoURL( |
| 179 signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE, |
| 180 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false) |
179 : GURL(chrome::kChromeUINewTabURL); | 181 : GURL(chrome::kChromeUINewTabURL); |
180 EXPECT_EQ(expected_first_tab_url, tab_strip->GetWebContentsAt(0)->GetURL()); | 182 EXPECT_EQ(expected_first_tab_url, tab_strip->GetWebContentsAt(0)->GetURL()); |
181 | 183 |
182 EXPECT_EQ("title1.html", | 184 EXPECT_EQ("title1.html", |
183 tab_strip->GetWebContentsAt(1)->GetURL().ExtractFileName()); | 185 tab_strip->GetWebContentsAt(1)->GetURL().ExtractFileName()); |
184 } | 186 } |
185 | 187 |
186 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTriggeredResetTest, | 188 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTriggeredResetTest, |
187 TestMultiProfile) { | 189 TestMultiProfile) { |
188 SessionStartupPref pref(SessionStartupPref::DEFAULT); | 190 SessionStartupPref pref(SessionStartupPref::DEFAULT); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 new_browser->host_desktop_type()); | 248 new_browser->host_desktop_type()); |
247 ASSERT_NE(nullptr, other_profile_browser); | 249 ASSERT_NE(nullptr, other_profile_browser); |
248 | 250 |
249 // Check for the expected reset dialog in the second browser too. | 251 // Check for the expected reset dialog in the second browser too. |
250 TabStripModel* other_tab_strip = other_profile_browser->tab_strip_model(); | 252 TabStripModel* other_tab_strip = other_profile_browser->tab_strip_model(); |
251 ASSERT_LT(0, other_tab_strip->count()); | 253 ASSERT_LT(0, other_tab_strip->count()); |
252 EXPECT_EQ(internals::GetTriggeredResetSettingsURL(), | 254 EXPECT_EQ(internals::GetTriggeredResetSettingsURL(), |
253 other_tab_strip->GetActiveWebContents()->GetURL()); | 255 other_tab_strip->GetActiveWebContents()->GetURL()); |
254 g_browser_process->ReleaseModule(); | 256 g_browser_process->ReleaseModule(); |
255 } | 257 } |
OLD | NEW |