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

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

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change launch_type to an enum in proto Created 7 years 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 9d953dbfd7d7331eca463f002378c26b06f8dfac..a9fae6fef20911b553dbcac2d2977fc2430a3367 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
@@ -4,6 +4,7 @@
#include "base/basictypes.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
@@ -422,6 +423,33 @@ IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateCWSOrdinals) {
ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
}
+// Adjust the launch type on the first client and sync. Both clients should
+// have the same launch type values for the CWS.
+IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateLaunchType) {
+ ASSERT_TRUE(SetupSync());
+ ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
+
+ // Change the launch type to window.
+ extensions::SetLaunchType(GetProfile(1)->GetExtensionService(),
+ extension_misc::kWebStoreAppId,
+ extensions::LAUNCH_TYPE_WINDOW);
+ extensions::SetLaunchType(verifier()->GetExtensionService(),
+ extension_misc::kWebStoreAppId,
+ extensions::LAUNCH_TYPE_WINDOW);
+ ASSERT_TRUE(AwaitQuiescence());
+ ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
+
+ // Change the launch type to regular tab.
+ extensions::SetLaunchType(GetProfile(1)->GetExtensionService(),
+ extension_misc::kWebStoreAppId,
+ extensions::LAUNCH_TYPE_REGULAR);
+ extensions::SetLaunchType(verifier()->GetExtensionService(),
+ extension_misc::kWebStoreAppId,
+ extensions::LAUNCH_TYPE_REGULAR);
+ 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