| Index: chrome/browser/sync/test/integration/two_client_apps_sync_test.cc
|
| diff --git a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc
|
| index 2db4c35e7795b98cd415d23746fbb8a580414712..fc37503ca8f0f2e31e24dc62dbb004feae5f56d8 100644
|
| --- a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc
|
| +++ b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc
|
| @@ -29,6 +29,15 @@ using apps_helper::SetAppLaunchOrdinalForApp;
|
| using apps_helper::SetPageOrdinalForApp;
|
| using apps_helper::UninstallApp;
|
|
|
| +namespace {
|
| +
|
| +void MoveChromeAppToEnd(AppListExtensionSorting* ordering) {
|
| + ordering->Erase(extension_misc::kChromeAppId);
|
| + ordering->InsertAtBack(extension_misc::kChromeAppId);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| class TwoClientAppsSyncTest : public SyncTest {
|
| public:
|
| TwoClientAppsSyncTest() : SyncTest(TWO_CLIENT) {}
|
| @@ -422,6 +431,28 @@ IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateCWSOrdinals) {
|
| ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
|
| }
|
|
|
| +// Adjust the chrome app location within the app list on the first client and
|
| +// sync. Both clients should have the same app list ordinal values for the
|
| +// chrome app.
|
| +IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateChromeAppAppListOrdinal) {
|
| + ASSERT_TRUE(SetupSync());
|
| + ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
|
| +
|
| + // Change the app list ordinal.
|
| + AppListExtensionSorting* ordering =
|
| + GetProfile(0)->GetExtensionService()->extension_prefs()->
|
| + app_list_extension_sorting();
|
| + AppListExtensionSorting* verifier_ordering =
|
| + verifier()->GetExtensionService()->extension_prefs()->
|
| + app_list_extension_sorting();
|
| +
|
| + MoveChromeAppToEnd(ordering);
|
| + MoveChromeAppToEnd(verifier_ordering);
|
| +
|
| + ASSERT_TRUE(AwaitQuiescence());
|
| + ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
|
| +}
|
| +
|
| // TODO(akalin): Add tests exercising:
|
| // - Offline installation/uninstallation behavior
|
| // - App-specific properties
|
|
|