Index: chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc |
diff --git a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc |
index ff864041cdfd17aa3259d215814d60e9aad64192..536fd9f9fc03e1e881b01b5a478fdf6fd6f7cd6e 100644 |
--- a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc |
+++ b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc |
@@ -77,13 +77,9 @@ IN_PROC_BROWSER_TEST_F(AppListServiceImplBrowserTest, |
// Just requesting the profile path shouldn't set it. |
EXPECT_FALSE(local_state->HasPrefPath(prefs::kAppListProfile)); |
- // Loading the Profile* should be lazy, except on ChromeOS where it is bound |
- // to ChromeLauncherController, which always has a profile. |
-#if defined(OS_CHROMEOS) |
+ // The app list service is bound to ChromeLauncherController, which should |
+ // always have a profile. |
EXPECT_TRUE(service_->GetCurrentAppListProfile()); |
-#else |
- EXPECT_FALSE(service_->GetCurrentAppListProfile()); |
-#endif |
// Showing the app list for an unspecified profile, uses the loaded profile. |
service_->Show(); |
@@ -92,27 +88,9 @@ IN_PROC_BROWSER_TEST_F(AppListServiceImplBrowserTest, |
EXPECT_FALSE(test_api_->profile_loader()->IsAnyProfileLoading()); |
EXPECT_EQ(service_->GetCurrentAppListProfile(), browser()->profile()); |
-#if defined(OS_CHROMEOS) |
// ChromeOS doesn't record the app list profile pref, and doesn't do profile |
// switching. |
EXPECT_FALSE(local_state->HasPrefPath(prefs::kAppListProfile)); |
- |
-#else |
- // Preference should be updated automatically. |
- EXPECT_TRUE(local_state->HasPrefPath(prefs::kAppListProfile)); |
- EXPECT_EQ(local_state->GetString(prefs::kAppListProfile), |
- browser()->profile()->GetPath().BaseName().MaybeAsASCII()); |
- |
- // Show for a second, pre-loaded profile without dismissing. Don't try this on |
- // ChromeOS because it does not support profile switching the app list. |
- Profile* profile2 = test::CreateSecondProfileAsync(); |
- service_->ShowForProfile(profile2); |
- |
- // Current profile and saved path should update synchronously. |
- EXPECT_FALSE(test_api_->profile_loader()->IsAnyProfileLoading()); |
- EXPECT_EQ(profile2->GetPath(), service_->GetProfilePath(user_data_dir)); |
- EXPECT_EQ(profile2, service_->GetCurrentAppListProfile()); |
-#endif |
} |
// Tests that the AppListViewDelegate is created lazily. |
@@ -122,38 +100,6 @@ IN_PROC_BROWSER_TEST_F(AppListServiceImplBrowserTest, CreatedLazily) { |
EXPECT_TRUE(test_api_->view_delegate()); |
} |
-// Tests that deleting a profile properly clears the app list view delegate, but |
-// doesn't destroy it. Not built on ChromeOS, since profiles can't be deleted |
-// this way (the second profile isn't signed in, so the test fails when creating |
-// UserCloudPolicyManagerChromeOS). |
-#if !defined(OS_CHROMEOS) |
-IN_PROC_BROWSER_TEST_F(AppListServiceImplBrowserTest, |
- DeletingProfileUpdatesViewDelegate) { |
- Profile* second_profile = test::CreateSecondProfileAsync(); |
- service_->ShowForProfile(second_profile); |
- AppListViewDelegate* view_delegate = test_api_->view_delegate(); |
- |
- EXPECT_TRUE(view_delegate); |
- EXPECT_EQ(view_delegate->profile(), second_profile); |
- |
- ProfileManager* profile_manager = g_browser_process->profile_manager(); |
- |
- // Delete the profile being used by the app list. |
- profile_manager->ScheduleProfileForDeletion(second_profile->GetPath(), |
- ProfileManager::CreateCallback()); |
- |
- // View delegate doesn't change when changing profiles. |
- EXPECT_EQ(view_delegate, test_api_->view_delegate()); |
- |
- // But the profile gets cleared until shown again. |
- EXPECT_FALSE(view_delegate->profile()); |
- service_->ShowForProfile(browser()->profile()); |
- |
- EXPECT_EQ(view_delegate, test_api_->view_delegate()); |
- EXPECT_EQ(view_delegate->profile(), browser()->profile()); |
-} |
-#endif // !defined(OS_CHROMEOS) |
- |
// Test that all the items in the context menu for a hosted app have valid |
// labels. |
IN_PROC_BROWSER_TEST_F(AppListServiceImplBrowserTest, ShowContextMenu) { |