Chromium Code Reviews| 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..119c04392b07b2c5f0ec050dc2f97967490d4aa5 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(AwaitQuiescence()); |
|
Raghu Simha
2011/02/14 05:29:52
In this one specific case, you may be able to get
Nicolas Zea
2011/02/14 21:18:41
Done.
|
| + |
| + // 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)); |
| + } |
| +} |