| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/sync/test/integration/apps_helper.h" | 9 #include "chrome/browser/sync/test/integration/apps_helper.h" |
| 10 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h" | 10 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h" |
| 11 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | |
| 12 #include "chrome/browser/sync/test/integration/sync_test.h" | 11 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 12 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h
" |
| 13 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 13 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 14 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 14 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 15 #include "components/browser_sync/profile_sync_service.h" | 15 #include "components/browser_sync/profile_sync_service.h" |
| 16 #include "ui/app_list/app_list_switches.h" | 16 #include "ui/app_list/app_list_switches.h" |
| 17 | 17 |
| 18 using sync_integration_test_util::AwaitCommitActivityCompletion; | |
| 19 | |
| 20 namespace { | 18 namespace { |
| 21 | 19 |
| 22 const size_t kNumDefaultApps = 2; | 20 const size_t kNumDefaultApps = 2; |
| 23 | 21 |
| 24 bool AllProfilesHaveSameAppList() { | 22 bool AllProfilesHaveSameAppList() { |
| 25 return SyncAppListHelper::GetInstance()->AllProfilesHaveSameAppList(); | 23 return SyncAppListHelper::GetInstance()->AllProfilesHaveSameAppList(); |
| 26 } | 24 } |
| 27 | 25 |
| 28 } // namespace | 26 } // namespace |
| 29 | 27 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const size_t kNumApps = 5; | 63 const size_t kNumApps = 5; |
| 66 for (int i = 0; i < static_cast<int>(kNumApps); ++i) { | 64 for (int i = 0; i < static_cast<int>(kNumApps); ++i) { |
| 67 apps_helper::InstallApp(GetProfile(0), i); | 65 apps_helper::InstallApp(GetProfile(0), i); |
| 68 apps_helper::InstallApp(verifier(), i); | 66 apps_helper::InstallApp(verifier(), i); |
| 69 } | 67 } |
| 70 | 68 |
| 71 app_list::AppListSyncableService* service = | 69 app_list::AppListSyncableService* service = |
| 72 app_list::AppListSyncableServiceFactory::GetForProfile(verifier()); | 70 app_list::AppListSyncableServiceFactory::GetForProfile(verifier()); |
| 73 ASSERT_EQ(kNumApps + kNumDefaultApps, service->GetNumSyncItemsForTest()); | 71 ASSERT_EQ(kNumApps + kNumDefaultApps, service->GetNumSyncItemsForTest()); |
| 74 | 72 |
| 75 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService(0))); | 73 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); |
| 76 ASSERT_TRUE(AllProfilesHaveSameAppList()); | 74 ASSERT_TRUE(AllProfilesHaveSameAppList()); |
| 77 } | 75 } |
| OLD | NEW |