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 f5e8e1ecaf8368ca7593267805d9385e188bc61c..c039cd5fcfa173ed50c8eb4532f68c598204b643 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 |
@@ -31,3 +31,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(AwaitQuiescence()); |
+ |
+ // 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)); |
+ } |
+} |