| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/live_sync/live_sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 10 #include "chrome/browser/sync/test/live_sync/passwords_helper.h" | 10 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
| 11 | 11 |
| 12 using passwords_helper::AddLogin; | 12 using passwords_helper::AddLogin; |
| 13 using passwords_helper::AllProfilesContainSamePasswordForms; | 13 using passwords_helper::AllProfilesContainSamePasswordForms; |
| 14 using passwords_helper::AllProfilesContainSamePasswordFormsAsVerifier; | 14 using passwords_helper::AllProfilesContainSamePasswordFormsAsVerifier; |
| 15 using passwords_helper::CreateTestPasswordForm; | 15 using passwords_helper::CreateTestPasswordForm; |
| 16 using passwords_helper::GetPasswordCount; | 16 using passwords_helper::GetPasswordCount; |
| 17 using passwords_helper::GetPasswordStore; | 17 using passwords_helper::GetPasswordStore; |
| 18 using passwords_helper::GetVerifierPasswordCount; | 18 using passwords_helper::GetVerifierPasswordCount; |
| 19 using passwords_helper::GetVerifierPasswordStore; | 19 using passwords_helper::GetVerifierPasswordStore; |
| 20 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier; | 20 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier; |
| 21 using passwords_helper::RemoveLogin; | 21 using passwords_helper::RemoveLogin; |
| 22 using passwords_helper::RemoveLogins; | 22 using passwords_helper::RemoveLogins; |
| 23 using passwords_helper::SetPassphrase; | 23 using passwords_helper::SetPassphrase; |
| 24 using passwords_helper::UpdateLogin; | 24 using passwords_helper::UpdateLogin; |
| 25 | 25 |
| 26 using webkit_glue::PasswordForm; | 26 using webkit_glue::PasswordForm; |
| 27 | 27 |
| 28 static const char* kValidPassphrase = "passphrase!"; | 28 static const char* kValidPassphrase = "passphrase!"; |
| 29 | 29 |
| 30 class TwoClientPasswordsSyncTest : public LiveSyncTest { | 30 class TwoClientPasswordsSyncTest : public SyncTest { |
| 31 public: | 31 public: |
| 32 TwoClientPasswordsSyncTest() : LiveSyncTest(TWO_CLIENT) {} | 32 TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {} |
| 33 virtual ~TwoClientPasswordsSyncTest() {} | 33 virtual ~TwoClientPasswordsSyncTest() {} |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(TwoClientPasswordsSyncTest); | 36 DISALLOW_COPY_AND_ASSIGN(TwoClientPasswordsSyncTest); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 // TCM ID - 3732277 | 39 // TCM ID - 3732277 |
| 40 // TODO(sync): Enable after MockKeychain is fixed. http://crbug.com/89808. | 40 // TODO(sync): Enable after MockKeychain is fixed. http://crbug.com/89808. |
| 41 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
| 42 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, DISABLED_Add) { | 42 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, DISABLED_Add) { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 314 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 315 | 315 |
| 316 SetPassphrase(1, kValidPassphrase); | 316 SetPassphrase(1, kValidPassphrase); |
| 317 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); | 317 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); |
| 318 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase.")); | 318 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase.")); |
| 319 | 319 |
| 320 SetPassphrase(1, kValidPassphrase); | 320 SetPassphrase(1, kValidPassphrase); |
| 321 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); | 321 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); |
| 322 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again.")); | 322 ASSERT_TRUE(GetClient(1)->AwaitSyncCycleCompletion("Set passphrase again.")); |
| 323 } | 323 } |
| OLD | NEW |