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 <string> | 5 #include <string> |
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/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/chrome_notification_types.h" |
17 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
18 #include "chrome/browser/history/history_service.h" | 19 #include "chrome/browser/history/history_service.h" |
19 #include "chrome/browser/history/history_service_factory.h" | 20 #include "chrome/browser/history/history_service_factory.h" |
20 #include "chrome/browser/io_thread.h" | 21 #include "chrome/browser/io_thread.h" |
21 #include "chrome/browser/prefs/browser_prefs.h" | 22 #include "chrome/browser/prefs/browser_prefs.h" |
22 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 23 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/profiles/profile_info_cache.h" | 25 #include "chrome/browser/profiles/profile_info_cache.h" |
25 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
26 #include "chrome/browser/ui/browser.h" | 27 #include "chrome/browser/ui/browser.h" |
27 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
28 #include "chrome/common/chrome_notification_types.h" | |
29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
32 #include "chrome/test/base/scoped_testing_local_state.h" | 32 #include "chrome/test/base/scoped_testing_local_state.h" |
33 #include "chrome/test/base/test_browser_window.h" | 33 #include "chrome/test/base/test_browser_window.h" |
34 #include "chrome/test/base/testing_browser_process.h" | 34 #include "chrome/test/base/testing_browser_process.h" |
35 #include "chrome/test/base/testing_profile.h" | 35 #include "chrome/test/base/testing_profile.h" |
36 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
37 #include "content/public/test/test_browser_thread.h" | 37 #include "content/public/test/test_browser_thread.h" |
38 #include "testing/gmock/include/gmock/gmock.h" | 38 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 dest_path2.BaseName().MaybeAsASCII()); | 762 dest_path2.BaseName().MaybeAsASCII()); |
763 profile_manager->ScheduleProfileForDeletion(dest_path2, | 763 profile_manager->ScheduleProfileForDeletion(dest_path2, |
764 ProfileManager::CreateCallback()); | 764 ProfileManager::CreateCallback()); |
765 // Spin the message loop so that all the callbacks can finish running. | 765 // Spin the message loop so that all the callbacks can finish running. |
766 message_loop_.RunUntilIdle(); | 766 message_loop_.RunUntilIdle(); |
767 | 767 |
768 EXPECT_EQ(dest_path3, profile_manager->GetLastUsedProfile()->GetPath()); | 768 EXPECT_EQ(dest_path3, profile_manager->GetLastUsedProfile()->GetPath()); |
769 EXPECT_EQ(profile_name3, local_state->GetString(prefs::kProfileLastUsed)); | 769 EXPECT_EQ(profile_name3, local_state->GetString(prefs::kProfileLastUsed)); |
770 } | 770 } |
771 #endif // !defined(OS_MACOSX) | 771 #endif // !defined(OS_MACOSX) |
OLD | NEW |