| 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 |
| 146 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, | 152 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, |
| 147 SetPassphraseAndThenSetupSync) { | 153 MAYBE_SetPassphraseAndThenSetupSync) { |
| 148 ASSERT_TRUE(SetupClients()); | 154 ASSERT_TRUE(SetupClients()); |
| 149 | 155 |
| 150 ASSERT_TRUE(GetClient(0)->SetupSync()); | 156 ASSERT_TRUE(GetClient(0)->SetupSync()); |
| 151 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT); | 157 SetEncryptionPassphrase(0, kValidPassphrase, ProfileSyncService::EXPLICIT); |
| 152 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(0))); | 158 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(0))); |
| 153 | 159 |
| 154 // When client 1 hits a passphrase required state, we can infer that | 160 // When client 1 hits a passphrase required state, we can infer that |
| 155 // client 0's passphrase has been committed. to the server. | 161 // client 0's passphrase has been committed. to the server. |
| 156 ASSERT_FALSE(GetClient(1)->SetupSync()); | 162 ASSERT_FALSE(GetClient(1)->SetupSync()); |
| 157 ASSERT_TRUE(AwaitPassphraseRequired(GetSyncService(1))); | 163 ASSERT_TRUE(AwaitPassphraseRequired(GetSyncService(1))); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 264 |
| 259 // Blocks and waits for password forms in all profiles to match. | 265 // Blocks and waits for password forms in all profiles to match. |
| 260 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); | 266 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); |
| 261 | 267 |
| 262 // Check that total number of passwords is as expected. | 268 // Check that total number of passwords is as expected. |
| 263 for (int i = 0; i < num_clients(); ++i) { | 269 for (int i = 0; i < num_clients(); ++i) { |
| 264 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) << | 270 ASSERT_EQ(GetPasswordCount(i), init_password_count + num_clients()) << |
| 265 "Total password count is wrong."; | 271 "Total password count is wrong."; |
| 266 } | 272 } |
| 267 } | 273 } |
| OLD | NEW |