OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |