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

Side by Side Diff: chrome/test/live_sync/two_client_live_passwords_sync_test.cc

Issue 7477006: Add additional check for required passphrase in SetupSync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/engine/model_safe_worker.h" 6 #include "chrome/browser/sync/engine/model_safe_worker.h"
7 #include "chrome/browser/sync/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/sessions/session_state.h" 8 #include "chrome/browser/sync/sessions/session_state.h"
9 #include "chrome/test/live_sync/live_passwords_sync_test.h" 9 #include "chrome/test/live_sync/live_passwords_sync_test.h"
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 PasswordForm form2 = CreateTestPasswordForm(2); 194 PasswordForm form2 = CreateTestPasswordForm(2);
195 AddLogin(GetVerifierPasswordStore(), form2); 195 AddLogin(GetVerifierPasswordStore(), form2);
196 AddLogin(GetPasswordStore(1), form2); 196 AddLogin(GetPasswordStore(1), form2);
197 ASSERT_TRUE(AwaitQuiescence()); 197 ASSERT_TRUE(AwaitQuiescence());
198 198
199 ASSERT_EQ(3, GetVerifierPasswordCount()); 199 ASSERT_EQ(3, GetVerifierPasswordCount());
200 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); 200 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier());
201 } 201 }
202 202
203 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, 203 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
204 FLAKY_SetPassphraseAndThenSetupSync) { 204 SetPassphraseAndThenSetupSync) {
205 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 205 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
206 206
207 ASSERT_TRUE(GetClient(0)->SetupSync()); 207 ASSERT_TRUE(GetClient(0)->SetupSync());
208 SetPassphrase(0, kValidPassphrase, true); 208 SetPassphrase(0, kValidPassphrase, true);
209 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 209 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
210 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync.")); 210 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync."));
211 211
212 ASSERT_FALSE(GetClient(1)->SetupSync()); 212 ASSERT_FALSE(GetClient(1)->SetupSync());
213 SetPassphrase(1, kValidPassphrase, false); 213 SetPassphrase(1, kValidPassphrase, false);
214 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 214 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
(...skipping 17 matching lines...) Expand all
232 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 232 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
233 233
234 SetPassphrase(1, kValidPassphrase, false); 234 SetPassphrase(1, kValidPassphrase, false);
235 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 235 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
236 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase.")); 236 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase."));
237 237
238 SetPassphrase(1, kValidPassphrase, false); 238 SetPassphrase(1, kValidPassphrase, false);
239 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 239 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
240 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again.")); 240 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again."));
241 } 241 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698