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 "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 { | 153 { |
154 scoped_ptr<Profile> profile(CreateProfile( | 154 scoped_ptr<Profile> profile(CreateProfile( |
155 temp_dir.path(), &delegate, Profile::CREATE_MODE_SYNCHRONOUS)); | 155 temp_dir.path(), &delegate, Profile::CREATE_MODE_SYNCHRONOUS)); |
156 CheckChromeVersion(profile.get(), false); | 156 CheckChromeVersion(profile.get(), false); |
157 } | 157 } |
158 | 158 |
159 FlushIoTaskRunnerAndSpinThreads(); | 159 FlushIoTaskRunnerAndSpinThreads(); |
160 } | 160 } |
161 | 161 |
| 162 // Flaky: http://crbug.com/393177 |
162 // Test OnProfileCreate is called with is_new_profile set to true when | 163 // Test OnProfileCreate is called with is_new_profile set to true when |
163 // creating a new profile asynchronously. | 164 // creating a new profile asynchronously. |
164 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, CreateNewProfileAsynchronous) { | 165 IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, |
| 166 DISABLED_CreateNewProfileAsynchronous) { |
165 base::ScopedTempDir temp_dir; | 167 base::ScopedTempDir temp_dir; |
166 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 168 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
167 | 169 |
168 MockProfileDelegate delegate; | 170 MockProfileDelegate delegate; |
169 EXPECT_CALL(delegate, OnProfileCreated(testing::NotNull(), true, true)); | 171 EXPECT_CALL(delegate, OnProfileCreated(testing::NotNull(), true, true)); |
170 | 172 |
171 { | 173 { |
172 content::WindowedNotificationObserver observer( | 174 content::WindowedNotificationObserver observer( |
173 chrome::NOTIFICATION_PROFILE_CREATED, | 175 chrome::NOTIFICATION_PROFILE_CREATED, |
174 content::NotificationService::AllSources()); | 176 content::NotificationService::AllSources()); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 } | 454 } |
453 | 455 |
454 // Release the IO thread thread. | 456 // Release the IO thread thread. |
455 unblock->Signal(); | 457 unblock->Signal(); |
456 } | 458 } |
457 | 459 |
458 ASSERT_TRUE(mis_wrote); | 460 ASSERT_TRUE(mis_wrote); |
459 } | 461 } |
460 | 462 |
461 #endif // defined(USE_X11) || defined(OS_WIN) | 463 #endif // defined(USE_X11) || defined(OS_WIN) |
OLD | NEW |