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

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

Issue 2265703002: [Sync] Fix bug in NonUIDataTypeController::Stop(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | components/sync/driver/non_ui_data_type_controller.h » ('j') | 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) 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 RemoveLogin(GetPasswordStore(1), form0); 137 RemoveLogin(GetPasswordStore(1), form0);
138 RemoveLogin(GetVerifierPasswordStore(), form0); 138 RemoveLogin(GetVerifierPasswordStore(), form0);
139 ASSERT_EQ(1, GetVerifierPasswordCount()); 139 ASSERT_EQ(1, GetVerifierPasswordCount());
140 140
141 // Wait for deletion from client 1 to propagate. 141 // Wait for deletion from client 1 to propagate.
142 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(0)); 142 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(0));
143 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); 143 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier());
144 } 144 }
145 145
146 // Flaky on Mac: https://crbug.com/639449
147 #if defined(OS_MACOSX)
148 #define MAYBE_SetPassphraseAndThenSetupSync DISABLED_SetPassphraseAndThenSetupSy nc
149 #else
150 #define MAYBE_SetPassphraseAndThenSetupSync SetPassphraseAndThenSetupSync
151 #endif
152 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, 146 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
153 MAYBE_SetPassphraseAndThenSetupSync) { 147 SetPassphraseAndThenSetupSync) {
154 ASSERT_TRUE(SetupClients()); 148 ASSERT_TRUE(SetupClients());
155 149
156 ASSERT_TRUE(GetClient(0)->SetupSync()); 150 ASSERT_TRUE(GetClient(0)->SetupSync());
157 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT); 151 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT);
158 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(0))); 152 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(0)));
159 153
160 // When client 1 hits a passphrase required state, we can infer that 154 // When client 1 hits a passphrase required state, we can infer that
161 // client 0's passphrase has been committed. to the server. 155 // client 0's passphrase has been committed. to the server.
162 ASSERT_FALSE(GetClient(1)->SetupSync()); 156 ASSERT_FALSE(GetClient(1)->SetupSync());
163 ASSERT_TRUE(AwaitPassphraseRequired(GetSyncService(1))); 157 ASSERT_TRUE(AwaitPassphraseRequired(GetSyncService(1)));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 258
265 // Blocks and waits for password forms in all profiles to match. 259 // Blocks and waits for password forms in all profiles to match.
266 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); 260 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms());
267 261
268 // Check that total number of passwords is as expected. 262 // Check that total number of passwords is as expected.
269 for (int i = 0; i < num_clients(); ++i) { 263 for (int i = 0; i < num_clients(); ++i) {
270 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) << 264 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) <<
271 "Total password count is wrong."; 265 "Total password count is wrong.";
272 } 266 }
273 } 267 }
OLDNEW
« no previous file with comments | « no previous file | components/sync/driver/non_ui_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698