| 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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 #import <Cocoa/Cocoa.h> | 6 #import <Cocoa/Cocoa.h> |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #import <Foundation/NSAppleEventDescriptor.h> | 8 #import <Foundation/NSAppleEventDescriptor.h> |
| 9 #import <objc/message.h> | 9 #import <objc/message.h> |
| 10 #import <objc/runtime.h> | 10 #import <objc/runtime.h> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 EXPECT_NE(Profile::CREATE_STATUS_REMOTE_FAIL, status); | 211 EXPECT_NE(Profile::CREATE_STATUS_REMOTE_FAIL, status); |
| 212 // This will be called multiple times. Wait until the profile is initialized | 212 // This will be called multiple times. Wait until the profile is initialized |
| 213 // fully to quit the loop. | 213 // fully to quit the loop. |
| 214 if (status == Profile::CREATE_STATUS_INITIALIZED) | 214 if (status == Profile::CREATE_STATUS_INITIALIZED) |
| 215 quit_closure.Run(); | 215 quit_closure.Run(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void CreateAndWaitForSystemProfile() { | 218 void CreateAndWaitForSystemProfile() { |
| 219 ProfileManager::CreateCallback create_callback = | 219 ProfileManager::CreateCallback create_callback = |
| 220 base::Bind(&CreateProfileCallback, | 220 base::Bind(&CreateProfileCallback, |
| 221 base::MessageLoop::current()->QuitClosure()); | 221 base::MessageLoop::current()->QuitWhenIdleClosure()); |
| 222 g_browser_process->profile_manager()->CreateProfileAsync( | 222 g_browser_process->profile_manager()->CreateProfileAsync( |
| 223 ProfileManager::GetSystemProfilePath(), | 223 ProfileManager::GetSystemProfilePath(), |
| 224 create_callback, | 224 create_callback, |
| 225 base::string16(), | 225 base::string16(), |
| 226 base::string16(), | 226 base::string16(), |
| 227 std::string()); | 227 std::string()); |
| 228 base::RunLoop().Run(); | 228 base::RunLoop().Run(); |
| 229 } | 229 } |
| 230 | 230 |
| 231 class AppControllerNewProfileManagementBrowserTest | 231 class AppControllerNewProfileManagementBrowserTest |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 ui_test_utils::NavigateToURL(browser3, test_url1); | 692 ui_test_utils::NavigateToURL(browser3, test_url1); |
| 693 EXPECT_EQ(g_handoff_url, GURL()); | 693 EXPECT_EQ(g_handoff_url, GURL()); |
| 694 | 694 |
| 695 // Activate the original browser window. | 695 // Activate the original browser window. |
| 696 Browser* browser1 = active_browser_list->get(0); | 696 Browser* browser1 = active_browser_list->get(0); |
| 697 browser1->window()->Show(); | 697 browser1->window()->Show(); |
| 698 EXPECT_EQ(g_handoff_url, test_url2); | 698 EXPECT_EQ(g_handoff_url, test_url2); |
| 699 } | 699 } |
| 700 | 700 |
| 701 } // namespace | 701 } // namespace |
| OLD | NEW |