OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 // Get some base objects. | 1081 // Get some base objects. |
1082 ash::test::AshTestHelper::GetTestSessionStateDelegate() | 1082 ash::test::AshTestHelper::GetTestSessionStateDelegate() |
1083 ->set_logged_in_users(2); | 1083 ->set_logged_in_users(2); |
1084 shell_delegate_ = static_cast<ash::test::TestShellDelegate*>( | 1084 shell_delegate_ = static_cast<ash::test::TestShellDelegate*>( |
1085 ash::WmShell::Get()->delegate()); | 1085 ash::WmShell::Get()->delegate()); |
1086 shell_delegate_->set_multi_profiles_enabled(true); | 1086 shell_delegate_->set_multi_profiles_enabled(true); |
1087 } | 1087 } |
1088 | 1088 |
1089 void TearDown() override { | 1089 void TearDown() override { |
1090 ChromeLauncherControllerImplTest::TearDown(); | 1090 ChromeLauncherControllerImplTest::TearDown(); |
1091 user_manager_enabler_.reset(); | |
1092 for (ProfileToNameMap::iterator it = created_profiles_.begin(); | 1091 for (ProfileToNameMap::iterator it = created_profiles_.begin(); |
1093 it != created_profiles_.end(); ++it) | 1092 it != created_profiles_.end(); ++it) |
1094 profile_manager_->DeleteTestingProfile(it->second); | 1093 profile_manager_->DeleteTestingProfile(it->second); |
1095 chromeos::WallpaperManager::Shutdown(); | 1094 chromeos::WallpaperManager::Shutdown(); |
| 1095 user_manager_enabler_.reset(); |
1096 | 1096 |
1097 // A Task is leaked if we don't destroy everything, then run the message | 1097 // A Task is leaked if we don't destroy everything, then run the message |
1098 // loop. | 1098 // loop. |
1099 base::RunLoop().RunUntilIdle(); | 1099 base::RunLoop().RunUntilIdle(); |
1100 } | 1100 } |
1101 | 1101 |
1102 // Creates a profile for a given |user_name|. Note that this class will keep | 1102 // Creates a profile for a given |user_name|. Note that this class will keep |
1103 // the ownership of the created object. | 1103 // the ownership of the created object. |
1104 TestingProfile* CreateMultiUserProfile(const std::string& user_name) { | 1104 TestingProfile* CreateMultiUserProfile(const std::string& user_name) { |
1105 const std::string email_string = user_name + "@example.com"; | 1105 const std::string email_string = user_name + "@example.com"; |
(...skipping 2924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4030 | 4030 |
4031 // Pinned state should not change. | 4031 // Pinned state should not change. |
4032 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4032 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
4033 launcher_controller_->UnpinAppWithID(extension2_->id()); | 4033 launcher_controller_->UnpinAppWithID(extension2_->id()); |
4034 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); | 4034 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); |
4035 | 4035 |
4036 // Resume syncing and sync information overrides local copy. | 4036 // Resume syncing and sync information overrides local copy. |
4037 StartAppSyncService(copy_sync_list); | 4037 StartAppSyncService(copy_sync_list); |
4038 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4038 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
4039 } | 4039 } |
OLD | NEW |