Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8201)

Unified Diff: chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc

Issue 2430753002: Discard unused AppListPrefs code. (Closed)
Patch Set: update Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
index 2c68e160d962fd9417e6d2f658e4200bc98021e3..ce6269bfb6b360d0021d4b52f7b6e81fa3981c19 100644
--- a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/sync/test/integration/sync_app_list_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
-#include "chrome/browser/ui/app_list/app_list_prefs.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
#include "content/public/browser/notification_service.h"
@@ -54,31 +53,6 @@ const app_list::AppListSyncableService::SyncItem* GetSyncItem(
return service->GetSyncItem(app_id);
}
-// Checks that the synced changes are mirrored in AppListPrefs.
-void CheckAppInfoInPrefs(Profile* profile,
- const std::vector<std::string>& expected_ids) {
- app_list::AppListSyncableService* service =
- app_list::AppListSyncableServiceFactory::GetForProfile(profile);
-
- app_list::AppListPrefs::AppListInfoMap infos;
-
- app_list::AppListPrefs::Get(profile)->GetAllAppListInfos(&infos);
- EXPECT_EQ(expected_ids.size(), infos.size());
-
- for (auto id : expected_ids) {
- app_list::AppListItem* item =
- service->GetModel()->top_level_item_list()->FindItem(id);
- ASSERT_TRUE(item);
- // Ensure local prefs matches the model data.
- std::unique_ptr<app_list::AppListPrefs::AppListInfo> info =
- app_list::AppListPrefs::Get(profile)->GetAppListInfo(id);
- ASSERT_TRUE(info);
- EXPECT_EQ(item->name(), info->name);
- EXPECT_TRUE(item->position().Equals(info->position));
- EXPECT_EQ(item->folder_id(), info->parent_id);
- }
-}
-
} // namespace
class TwoClientAppListSyncTest : public SyncTest {
@@ -401,31 +375,19 @@ IN_PROC_BROWSER_TEST_F(TwoClientAppListSyncTest, Move) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameAppList());
- std::vector<std::string> app_ids;
- // AppListPrefs should be empty since it only begins observing the model after
- // sync starts.
- CheckAppInfoInPrefs(GetProfile(1), app_ids);
-
const int kNumApps = 5;
- for (int i = 0; i < kNumApps; ++i) {
- app_ids.push_back(InstallApp(GetProfile(0), i));
+ for (int i = 0; i < kNumApps; ++i)
InstallApp(GetProfile(1), i);
- }
+
ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(AllProfilesHaveSameAppList());
- // AppListPrefs should contain the newly installed apps.
- CheckAppInfoInPrefs(GetProfile(1), app_ids);
-
size_t first = kNumDefaultApps;
SyncAppListHelper::GetInstance()->MoveApp(
GetProfile(0), first + 1, first + 2);
ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(AllProfilesHaveSameAppList());
-
- // AppListPrefs should reflect the apps being moved in the model.
- CheckAppInfoInPrefs(GetProfile(1), app_ids);
}
// Install a Default App on both clients, then sync. Remove the app on one
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698