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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 content::NOTIFICATION_LOAD_STOP, | 1180 content::NOTIFICATION_LOAD_STOP, |
1181 content::NotificationService::AllSources()); | 1181 content::NotificationService::AllSources()); |
1182 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, | 1182 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false, |
1183 browser()->host_desktop_type())); | 1183 browser()->host_desktop_type())); |
1184 | 1184 |
1185 // This should have created a new browser window. | 1185 // This should have created a new browser window. |
1186 Browser* new_browser = FindOneOtherBrowser(browser()); | 1186 Browser* new_browser = FindOneOtherBrowser(browser()); |
1187 ASSERT_TRUE(new_browser); | 1187 ASSERT_TRUE(new_browser); |
1188 | 1188 |
1189 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 1189 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
1190 // There should be only one tab. | 1190 // There should be only one tab, except on Windows 10. See crbug.com/505029. |
1191 EXPECT_EQ(1, tab_strip->count()); | 1191 const int tab_count = IsWindows10OrNewer() ? 2 : 1; |
| 1192 EXPECT_EQ(tab_count, tab_strip->count()); |
1192 } | 1193 } |
1193 | 1194 |
1194 #endif // !defined(OS_CHROMEOS) | 1195 #endif // !defined(OS_CHROMEOS) |
1195 | 1196 |
1196 // These tests are not applicable to Chrome OS as neither master_preferences nor | 1197 // These tests are not applicable to Chrome OS as neither master_preferences nor |
1197 // the sync promo exist there. | 1198 // the sync promo exist there. |
1198 #if !defined(OS_CHROMEOS) | 1199 #if !defined(OS_CHROMEOS) |
1199 | 1200 |
1200 // On a branded Linux build, policy is required to suppress the first-run | 1201 // On a branded Linux build, policy is required to suppress the first-run |
1201 // dialog. | 1202 // dialog. |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 ASSERT_EQ(1, tab_strip->count()); | 1626 ASSERT_EQ(1, tab_strip->count()); |
1626 EXPECT_EQ("title1.html", | 1627 EXPECT_EQ("title1.html", |
1627 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1628 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1628 } | 1629 } |
1629 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1630 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
1630 | 1631 |
1631 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1632 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
1632 // defined(ENABLE_CONFIGURATION_POLICY) | 1633 // defined(ENABLE_CONFIGURATION_POLICY) |
1633 | 1634 |
1634 #endif // !defined(OS_CHROMEOS) | 1635 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |