Index: chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc |
diff --git a/chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc b/chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc |
index 5183b0bc9afe0d5ae6d908891fcd4627c3529acd..0604239afe4155fba3daa7aad5549bf3bc04481b 100644 |
--- a/chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc |
+++ b/chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc |
@@ -33,3 +33,39 @@ IN_PROC_BROWSER_TEST_F(MultipleClientLiveSessionsSyncTest, AllChanged) { |
} |
} |
+IN_PROC_BROWSER_TEST_F(MultipleClientLiveSessionsSyncTest, |
+ EncryptedAndChanged) { |
+ ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
+ std::vector<std::vector<SessionWindow*>* > client_windows; |
+ |
+ for (int i = 0; i < num_clients(); ++i) { |
+ ASSERT_TRUE(CheckInitialState(i)); |
+ } |
+ |
+ // Enable encryption on client 0, should propagate to all other clients. |
+ ASSERT_TRUE(EnableEncryption(0)); |
+ |
+ // Wait for sync. |
+ // TODO(zea): Fix sync completion detection so we don't need this. For now, |
+ // the profile sync service harness detects completion before all encryption |
+ // changes are propagated. |
+ ASSERT_TRUE(GetClient(0)->AwaitGroupSyncCycleCompletion(clients())); |
+ |
+ // Open tabs on all clients and retain window information. |
+ for (int i = 0; i < num_clients(); ++i) { |
+ std::vector<SessionWindow*>* new_windows = |
+ InitializeNewWindowWithTab(i, GURL(StringPrintf("about:bubba%i", i))); |
+ ASSERT_TRUE(new_windows); |
+ client_windows.push_back(new_windows); |
+ } |
+ |
+ // Wait for sync. |
+ ASSERT_TRUE(AwaitQuiescence()); |
+ |
+ // Get foreign session data from all clients and check it against all |
+ // client_windows. |
+ for (int i = 0; i < num_clients(); ++i) { |
+ ASSERT_TRUE(IsEncrypted(i)); |
+ ASSERT_TRUE(CheckForeignSessionsAgainst(i, client_windows)); |
+ } |
+} |