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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
11 #import "chrome/browser/app_controller_mac.h" | 11 #import "chrome/browser/app_controller_mac.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/test/base/testing_browser_process.h" | 16 #include "chrome/test/base/testing_browser_process.h" |
17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
18 #include "chrome/test/base/testing_profile_manager.h" | 18 #include "chrome/test/base/testing_profile_manager.h" |
19 #include "chrome/test/base/ui_test_utils.h" | |
20 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
21 #include "testing/platform_test.h" | 20 #include "testing/platform_test.h" |
22 | 21 |
23 class AppControllerTest : public PlatformTest { | 22 class AppControllerTest : public PlatformTest { |
24 protected: | 23 protected: |
25 AppControllerTest() {} | 24 AppControllerTest() {} |
26 | 25 |
27 virtual void TearDown() { | 26 virtual void TearDown() { |
28 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL); | 27 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL); |
29 base::RunLoop().RunUntilIdle(); | 28 base::RunLoop().RunUntilIdle(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); | 64 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); |
66 | 65 |
67 // Delete the active profile. | 66 // Delete the active profile. |
68 manager.profile_manager()->ScheduleProfileForDeletion( | 67 manager.profile_manager()->ScheduleProfileForDeletion( |
69 dest_path1, ProfileManager::CreateCallback()); | 68 dest_path1, ProfileManager::CreateCallback()); |
70 | 69 |
71 base::RunLoop().RunUntilIdle(); | 70 base::RunLoop().RunUntilIdle(); |
72 | 71 |
73 EXPECT_EQ(dest_path2, [ac lastProfile]->GetPath()); | 72 EXPECT_EQ(dest_path2, [ac lastProfile]->GetPath()); |
74 } | 73 } |
OLD | NEW |