Chromium Code Reviews| 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..bd8d076d634c02c420e62f057d72d040be625e10 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) { |
|
xiyuan
2013/07/11 05:39:30
Get rid of the indent. It should start at col 0.
calamity
2013/07/15 07:02:33
Done.
|
| + 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 |