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

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

Issue 46893006: Disable flaky test: ProfileManagerBrowserTest.EphemeralProfile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DISABLE_ on Windows, not everywhere but Windows 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 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, EphemeralProfile) { 257 #if defined(OS_WIN)
258 // Flakily times out on Windows: http://crbug.com/314905
259 #define MAYBE_EphemeralProfile DISABLED_EphemeralProfile
260 #else
261 #define MAYBE_EphemeralProfile EphemeralProfile
262 #endif // defined(OS_WIN)
263 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, MAYBE_EphemeralProfile) {
258 #if defined(OS_WIN) && defined(USE_ASH) 264 #if defined(OS_WIN) && defined(USE_ASH)
259 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 265 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
260 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 266 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
261 return; 267 return;
262 #endif 268 #endif
263 269
264 // If multiprofile mode is not enabled, you can't switch between profiles. 270 // If multiprofile mode is not enabled, you can't switch between profiles.
265 if (!profiles::IsMultipleProfilesEnabled()) 271 if (!profiles::IsMultipleProfilesEnabled())
266 return; 272 return;
267 273
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 content::RunAllPendingInMessageLoop(); 323 content::RunAllPendingInMessageLoop();
318 EXPECT_EQ(1U, browser_list->size()); 324 EXPECT_EQ(1U, browser_list->size());
319 ASSERT_EQ(1U, cache.GetNumberOfProfiles()); 325 ASSERT_EQ(1U, cache.GetNumberOfProfiles());
320 326
321 // Closing the last window should not reduce the number of profiles. 327 // Closing the last window should not reduce the number of profiles.
322 browser_list->get(0)->window()->Close(); 328 browser_list->get(0)->window()->Close();
323 content::RunAllPendingInMessageLoop(); 329 content::RunAllPendingInMessageLoop();
324 EXPECT_EQ(0U, browser_list->size()); 330 EXPECT_EQ(0U, browser_list->size());
325 ASSERT_EQ(1U, cache.GetNumberOfProfiles()); 331 ASSERT_EQ(1U, cache.GetNumberOfProfiles());
326 } 332 }
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