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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/sync/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.h"
7 #include "chrome/browser/sync/test/integration/passwords_helper.h" 7 #include "chrome/browser/sync/test/integration/passwords_helper.h"
8 #include "chrome/browser/sync/test/integration/sync_test.h" 8 #include "chrome/browser/sync/test/integration/sync_test.h"
9 #include "sync/internal_api/public/engine/model_safe_worker.h" 9 #include "sync/internal_api/public/engine/model_safe_worker.h"
10 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 10 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 238 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
239 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Initial sync.")); 239 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Initial sync."));
240 240
241 ASSERT_FALSE(GetClient(1)->SetupSync()); 241 ASSERT_FALSE(GetClient(1)->SetupSync());
242 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired()); 242 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired());
243 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase)); 243 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase));
244 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 244 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
245 ASSERT_TRUE(GetClient(1)->AwaitFullSyncCompletion("Initial sync.")); 245 ASSERT_TRUE(GetClient(1)->AwaitFullSyncCompletion("Initial sync."));
246 246
247 // Following ensures types are enabled and active (see bug 87572). 247 // Following ensures types are enabled and active (see bug 87572).
248 csync::ModelSafeRoutingInfo routes; 248 syncer::ModelSafeRoutingInfo routes;
249 GetClient(0)->service()->GetModelSafeRoutingInfo(&routes); 249 GetClient(0)->service()->GetModelSafeRoutingInfo(&routes);
250 ASSERT_EQ(csync::GROUP_PASSWORD, routes[syncable::PASSWORDS]); 250 ASSERT_EQ(syncer::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
251 routes.clear(); 251 routes.clear();
252 GetClient(1)->service()->GetModelSafeRoutingInfo(&routes); 252 GetClient(1)->service()->GetModelSafeRoutingInfo(&routes);
253 ASSERT_EQ(csync::GROUP_PASSWORD, routes[syncable::PASSWORDS]); 253 ASSERT_EQ(syncer::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
254 } 254 }
255 255
256 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, 256 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
257 SetDifferentPassphraseAndThenSetupSync) { 257 SetDifferentPassphraseAndThenSetupSync) {
258 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 258 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
259 259
260 ASSERT_TRUE(GetClient(0)->SetupSync()); 260 ASSERT_TRUE(GetClient(0)->SetupSync());
261 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT); 261 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT);
262 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 262 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
263 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Initial sync.")); 263 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Initial sync."));
(...skipping 15 matching lines...) Expand all
279 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier()); 279 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier());
280 280
281 // Update 1 with the correct passphrase, the password should now sync over. 281 // Update 1 with the correct passphrase, the password should now sync over.
282 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired()); 282 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired());
283 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase)); 283 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase));
284 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 284 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
285 285
286 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 286 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
287 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); 287 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier());
288 } 288 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/sync/test/test_http_bridge_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698