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

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

Issue 2735253002: Remove useless blocking handle from sync integ tests.
Patch Set: Created 3 years, 9 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
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/hash.h" 10 #include "base/hash.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 // When client 1 hits a passphrase required state, we can infer that 150 // When client 1 hits a passphrase required state, we can infer that
151 // client 0's passphrase has been committed. to the server. 151 // client 0's passphrase has been committed. to the server.
152 ASSERT_FALSE(GetClient(1)->SetupSync()); 152 ASSERT_FALSE(GetClient(1)->SetupSync());
153 ASSERT_TRUE(PassphraseRequiredChecker(GetSyncService(1)).Wait()); 153 ASSERT_TRUE(PassphraseRequiredChecker(GetSyncService(1)).Wait());
154 154
155 // Get client 1 out of the passphrase required state. 155 // Get client 1 out of the passphrase required state.
156 ASSERT_TRUE(GetSyncService(1)->SetDecryptionPassphrase(kValidPassphrase)); 156 ASSERT_TRUE(GetSyncService(1)->SetDecryptionPassphrase(kValidPassphrase));
157 ASSERT_TRUE(PassphraseAcceptedChecker(GetSyncService(1)).Wait()); 157 ASSERT_TRUE(PassphraseAcceptedChecker(GetSyncService(1)).Wait());
158 158
159 // We must mark the setup complete now, since we just entered the passphrase
160 // and the previous SetupSync() call failed.
161 GetClient(1)->FinishSyncSetup();
162
163 // Move around some passwords to make sure it's all working. 159 // Move around some passwords to make sure it's all working.
164 PasswordForm form0 = CreateTestPasswordForm(0); 160 PasswordForm form0 = CreateTestPasswordForm(0);
165 AddLogin(GetPasswordStore(0), form0); 161 AddLogin(GetPasswordStore(0), form0);
166 162
167 ASSERT_TRUE(SamePasswordFormsChecker().Wait()); 163 ASSERT_TRUE(SamePasswordFormsChecker().Wait());
168 } 164 }
169 165
170 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ONLY(Delete)) { 166 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ONLY(Delete)) {
171 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 167 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
172 ASSERT_TRUE(AllProfilesContainSamePasswordForms()); 168 ASSERT_TRUE(AllProfilesContainSamePasswordForms());
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 250
255 // Blocks and waits for password forms in all profiles to match. 251 // Blocks and waits for password forms in all profiles to match.
256 ASSERT_TRUE(SamePasswordFormsChecker().Wait()); 252 ASSERT_TRUE(SamePasswordFormsChecker().Wait());
257 253
258 // Check that total number of passwords is as expected. 254 // Check that total number of passwords is as expected.
259 for (int i = 0; i < num_clients(); ++i) { 255 for (int i = 0; i < num_clients(); ++i) {
260 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) << 256 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) <<
261 "Total password count is wrong."; 257 "Total password count is wrong.";
262 } 258 }
263 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698