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 "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/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
10 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 10 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 RemoveLogin(GetPasswordStore(1), form0); | 177 RemoveLogin(GetPasswordStore(1), form0); |
178 RemoveLogin(GetVerifierPasswordStore(), form0); | 178 RemoveLogin(GetVerifierPasswordStore(), form0); |
179 ASSERT_TRUE(AwaitQuiescence()); | 179 ASSERT_TRUE(AwaitQuiescence()); |
180 | 180 |
181 ASSERT_EQ(1, GetVerifierPasswordCount()); | 181 ASSERT_EQ(1, GetVerifierPasswordCount()); |
182 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 182 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
183 } | 183 } |
184 | 184 |
185 // TCM ID - 7573511 | 185 // TCM ID - 7573511 |
186 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, DeleteAll) { | 186 // Flaky on Mac and Windows: http://crbug.com/111399 |
| 187 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 188 #define MAYBE_DeleteAll DISABLED_DeleteAll |
| 189 #else |
| 190 #define MAYBE_DeleteAll DeleteAll |
| 191 #endif |
| 192 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, MAYBE_DeleteAll) { |
187 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 193 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
188 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 194 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
189 | 195 |
190 PasswordForm form0 = CreateTestPasswordForm(0); | 196 PasswordForm form0 = CreateTestPasswordForm(0); |
191 AddLogin(GetVerifierPasswordStore(), form0); | 197 AddLogin(GetVerifierPasswordStore(), form0); |
192 AddLogin(GetPasswordStore(0), form0); | 198 AddLogin(GetPasswordStore(0), form0); |
193 PasswordForm form1 = CreateTestPasswordForm(1); | 199 PasswordForm form1 = CreateTestPasswordForm(1); |
194 AddLogin(GetVerifierPasswordStore(), form1); | 200 AddLogin(GetVerifierPasswordStore(), form1); |
195 AddLogin(GetPasswordStore(0), form1); | 201 AddLogin(GetPasswordStore(0), form1); |
196 ASSERT_TRUE(AwaitQuiescence()); | 202 ASSERT_TRUE(AwaitQuiescence()); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Password hasn't been synced to 1 yet. | 273 // Password hasn't been synced to 1 yet. |
268 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier()); | 274 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier()); |
269 | 275 |
270 // Update 1 with the correct passphrase, the password should now sync over. | 276 // Update 1 with the correct passphrase, the password should now sync over. |
271 SetPassphrase(1, kValidPassphrase); | 277 SetPassphrase(1, kValidPassphrase); |
272 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); | 278 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); |
273 | 279 |
274 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 280 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
275 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 281 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
276 } | 282 } |
OLD | NEW |