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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Make sure any pending tasks run before we destroy the profiles. | 174 // Make sure any pending tasks run before we destroy the profiles. |
175 message_loop_.RunAllPending(); | 175 message_loop_.RunAllPending(); |
176 | 176 |
177 profile_manager_.reset(); | 177 profile_manager_.reset(); |
178 | 178 |
179 // Make sure history cleans up correctly. | 179 // Make sure history cleans up correctly. |
180 message_loop_.RunAllPending(); | 180 message_loop_.RunAllPending(); |
181 } | 181 } |
182 | 182 |
183 // Tests asynchronous profile creation mechanism. | 183 // Tests asynchronous profile creation mechanism. |
184 TEST_F(ProfileManagerTest, CreateProfileAsync) { | 184 TEST_F(ProfileManagerTest, DISABLED_CreateProfileAsync) { |
185 FilePath dest_path = | 185 FilePath dest_path = |
186 temp_dir_.path().Append(FILE_PATH_LITERAL("New Profile")); | 186 temp_dir_.path().Append(FILE_PATH_LITERAL("New Profile")); |
187 | 187 |
188 MockObserver mock_observer; | 188 MockObserver mock_observer; |
189 EXPECT_CALL(mock_observer, OnProfileCreated(testing::NotNull())).Times(1); | 189 EXPECT_CALL(mock_observer, OnProfileCreated(testing::NotNull())).Times(1); |
190 | 190 |
191 profile_manager_->CreateProfileAsync(dest_path, &mock_observer); | 191 profile_manager_->CreateProfileAsync(dest_path, &mock_observer); |
192 | 192 |
193 message_loop_.RunAllPending(); | 193 message_loop_.RunAllPending(); |
194 } | 194 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 temp_dir_.path().Append(FILE_PATH_LITERAL("New Profile 2")); | 226 temp_dir_.path().Append(FILE_PATH_LITERAL("New Profile 2")); |
227 | 227 |
228 MockObserver mock_observer; | 228 MockObserver mock_observer; |
229 EXPECT_CALL(mock_observer, OnProfileCreated(testing::NotNull())).Times(2); | 229 EXPECT_CALL(mock_observer, OnProfileCreated(testing::NotNull())).Times(2); |
230 | 230 |
231 profile_manager_->CreateProfileAsync(dest_path1, &mock_observer); | 231 profile_manager_->CreateProfileAsync(dest_path1, &mock_observer); |
232 profile_manager_->CreateProfileAsync(dest_path2, &mock_observer); | 232 profile_manager_->CreateProfileAsync(dest_path2, &mock_observer); |
233 | 233 |
234 message_loop_.RunAllPending(); | 234 message_loop_.RunAllPending(); |
235 } | 235 } |
OLD | NEW |