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

Unified Diff: chrome/test/live_sync/multiple_client_live_sessions_sync_test.cc

Issue 6465005: [Sync] Initial support for encrypting any datatype (no UI hookup yet). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + small fix Created 9 years, 10 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/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));
+ }
+}
« no previous file with comments | « chrome/test/live_sync/live_sessions_sync_test.h ('k') | chrome/test/live_sync/two_client_live_sessions_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698