Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Issue 1247063007: Expect two tabs in StartupSupervisedUserProfile test on Windows 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nit Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698