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

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

Issue 17038002: Separate the NTP app ordering from the app list app ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 5 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
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

Powered by Google App Engine
This is Rietveld 408576698