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

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

Issue 6910012: Add method IsPassphraseRequiredForDecryption to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable failing test. Created 9 years, 7 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/sync_ui_util.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/password_manager/password_form_data.h" 6 #include "chrome/browser/password_manager/password_form_data.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 GetLogins(GetPasswordStore(0), forms0); 88 GetLogins(GetPasswordStore(0), forms0);
89 ASSERT_EQ(1U, forms0.size()); 89 ASSERT_EQ(1U, forms0.size());
90 90
91 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 91 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
92 92
93 std::vector<PasswordForm> forms1; 93 std::vector<PasswordForm> forms1;
94 GetLogins(GetPasswordStore(1), forms1); 94 GetLogins(GetPasswordStore(1), forms1);
95 ASSERT_EQ(1U, forms1.size()); 95 ASSERT_EQ(1U, forms1.size());
96 } 96 }
97 97
98 // TODO(rsimha): Marked as flaky due to crbug.com/81341.
99 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, 98 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
100 FLAKY_SetPassphraseAndThenSetupSync) { 99 SetPassphraseAndThenSetupSync) {
101 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 100 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
102 101
103 ASSERT_TRUE(GetClient(0)->SetupSync()); 102 ASSERT_TRUE(GetClient(0)->SetupSync());
104 SetPassphrase(0, kValidPassphrase, true); 103 SetPassphrase(0, kValidPassphrase, true);
105 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 104 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
106 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync.")); 105 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Initial sync."));
107 106
108 ASSERT_FALSE(GetClient(1)->SetupSync()); 107 ASSERT_FALSE(GetClient(1)->SetupSync());
109 SetPassphrase(1, kValidPassphrase, false); 108 SetPassphrase(1, kValidPassphrase, false);
110 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 109 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
111 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Initial sync.")); 110 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Initial sync."));
112 } 111 }
113 112
114 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, 113 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest,
115 SetPassphraseTwice) { 114 SetPassphraseTwice) {
116 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 115 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
117 116
118 SetPassphrase(0, kValidPassphrase, true); 117 SetPassphrase(0, kValidPassphrase, true);
119 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted()); 118 ASSERT_TRUE(GetClient(0)->AwaitPassphraseAccepted());
120 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 119 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
121 120
122 SetPassphrase(1, kValidPassphrase, false); 121 SetPassphrase(1, kValidPassphrase, false);
123 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 122 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
124 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase.")); 123 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase."));
125 124
126 SetPassphrase(1, kValidPassphrase, false); 125 SetPassphrase(1, kValidPassphrase, false);
127 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 126 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
128 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again.")); 127 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again."));
129 } 128 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698