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

Side by Side Diff: trunk/src/chrome/browser/profiles/profile_manager_browsertest.cc

Issue 53293005: Revert 232861 "Disable flaky test: ProfileManagerBrowserTest.Eph..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile_info_cache.h" 9 #include "chrome/browser/profiles/profile_info_cache.h"
10 #include "chrome/browser/profiles/profile_info_cache_observer.h" 10 #include "chrome/browser/profiles/profile_info_cache_observer.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Switch to the first profile without opening a new window. 247 // Switch to the first profile without opening a new window.
248 profiles::SwitchToProfile(path_profile1, desktop_type, false, 248 profiles::SwitchToProfile(path_profile1, desktop_type, false,
249 kOnProfileSwitchDoNothing); 249 kOnProfileSwitchDoNothing);
250 EXPECT_EQ(chrome::GetTotalBrowserCount(), 2U); 250 EXPECT_EQ(chrome::GetTotalBrowserCount(), 2U);
251 EXPECT_EQ(2U, browser_list->size()); 251 EXPECT_EQ(2U, browser_list->size());
252 252
253 EXPECT_EQ(path_profile1, browser_list->get(0)->profile()->GetPath()); 253 EXPECT_EQ(path_profile1, browser_list->get(0)->profile()->GetPath());
254 EXPECT_EQ(path_profile2, browser_list->get(1)->profile()->GetPath()); 254 EXPECT_EQ(path_profile2, browser_list->get(1)->profile()->GetPath());
255 } 255 }
256 256
257 #if defined(OS_WIN) 257 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, EphemeralProfile) {
258 // Flakily times out on Windows: http://crbug.com/314905
259 #define MAYBE_EphemeralProfile EphemeralProfile;
260 #else
261 #define MAYBE_EphemeralProfile DISABLED_EphemeralProfile;
262 #endif // defined(OS_WIN)
263 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, MAYBE_EphemeralProfile) {
264 #if defined(OS_WIN) && defined(USE_ASH) 258 #if defined(OS_WIN) && defined(USE_ASH)
265 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 259 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
266 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 260 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
267 return; 261 return;
268 #endif 262 #endif
269 263
270 // If multiprofile mode is not enabled, you can't switch between profiles. 264 // If multiprofile mode is not enabled, you can't switch between profiles.
271 if (!profiles::IsMultipleProfilesEnabled()) 265 if (!profiles::IsMultipleProfilesEnabled())
272 return; 266 return;
273 267
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 content::RunAllPendingInMessageLoop(); 317 content::RunAllPendingInMessageLoop();
324 EXPECT_EQ(1U, browser_list->size()); 318 EXPECT_EQ(1U, browser_list->size());
325 ASSERT_EQ(1U, cache.GetNumberOfProfiles()); 319 ASSERT_EQ(1U, cache.GetNumberOfProfiles());
326 320
327 // Closing the last window should not reduce the number of profiles. 321 // Closing the last window should not reduce the number of profiles.
328 browser_list->get(0)->window()->Close(); 322 browser_list->get(0)->window()->Close();
329 content::RunAllPendingInMessageLoop(); 323 content::RunAllPendingInMessageLoop();
330 EXPECT_EQ(0U, browser_list->size()); 324 EXPECT_EQ(0U, browser_list->size());
331 ASSERT_EQ(1U, cache.GetNumberOfProfiles()); 325 ASSERT_EQ(1U, cache.GetNumberOfProfiles());
332 } 326 }
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