OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/profiles/profile_info_cache.h" | 5 #include "chrome/browser/profiles/profile_info_cache.h" |
6 #include "chrome/browser/profiles/profile_manager.h" | 6 #include "chrome/browser/profiles/profile_manager.h" |
7 #include "chrome/test/base/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
8 #include "chrome/test/base/testing_browser_process.h" | 8 #include "chrome/test/base/testing_browser_process.h" |
9 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Make sure that last used profile preference is set correctly. | 52 // Make sure that last used profile preference is set correctly. |
53 Profile* last_used = ProfileManager::GetLastUsedProfile(); | 53 Profile* last_used = ProfileManager::GetLastUsedProfile(); |
54 EXPECT_EQ(new_profile_path, last_used->GetPath()); | 54 EXPECT_EQ(new_profile_path, last_used->GetPath()); |
55 } | 55 } |
56 | 56 |
57 // Delete all profiles in a multi profile setup and make sure a new one is | 57 // Delete all profiles in a multi profile setup and make sure a new one is |
58 // created. | 58 // created. |
59 | 59 |
60 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
61 // See crbug.com/104851 | 61 // Crashes/CHECKs. See crbug.com/104851 |
62 #define MAYBE_DeleteAllProfiles FLAKY_DeleteAllProfiles | 62 #define MAYBE_DeleteAllProfiles DISABLED_DeleteAllProfiles |
63 #else | 63 #else |
64 #define MAYBE_DeleteAllProfiles DeleteAllProfiles | 64 #define MAYBE_DeleteAllProfiles DeleteAllProfiles |
65 #endif | 65 #endif |
66 | 66 |
67 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, MAYBE_DeleteAllProfiles) { | 67 IN_PROC_BROWSER_TEST_F(ProfileManagerBrowserTest, MAYBE_DeleteAllProfiles) { |
68 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 68 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
69 ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); | 69 ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); |
70 | 70 |
71 // Create an additional profile. | 71 // Create an additional profile. |
72 BlockOnProfileInitObserver observer; | 72 BlockOnProfileInitObserver observer; |
(...skipping 21 matching lines...) Expand all Loading... |
94 EXPECT_EQ(cache.GetNumberOfProfiles(), 1U); | 94 EXPECT_EQ(cache.GetNumberOfProfiles(), 1U); |
95 FilePath new_profile_path = cache.GetPathOfProfileAtIndex(0); | 95 FilePath new_profile_path = cache.GetPathOfProfileAtIndex(0); |
96 EXPECT_NE(new_profile_path, profile_path1); | 96 EXPECT_NE(new_profile_path, profile_path1); |
97 EXPECT_NE(new_profile_path, profile_path2); | 97 EXPECT_NE(new_profile_path, profile_path2); |
98 | 98 |
99 // Make sure that last used profile preference is set correctly. | 99 // Make sure that last used profile preference is set correctly. |
100 Profile* last_used = ProfileManager::GetLastUsedProfile(); | 100 Profile* last_used = ProfileManager::GetLastUsedProfile(); |
101 EXPECT_EQ(new_profile_path, last_used->GetPath()); | 101 EXPECT_EQ(new_profile_path, last_used->GetPath()); |
102 } | 102 } |
103 #endif // OS_MACOSX | 103 #endif // OS_MACOSX |
OLD | NEW |