| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/password_manager/password_form_data.h" | 5 #include "chrome/browser/password_manager/password_form_data.h" |
| 6 #include "chrome/browser/sync/sessions/session_state.h" | 6 #include "chrome/browser/sync/sessions/session_state.h" |
| 7 #include "chrome/test/live_sync/live_passwords_sync_test.h" | 7 #include "chrome/test/live_sync/live_passwords_sync_test.h" |
| 8 | 8 |
| 9 using webkit_glue::PasswordForm; | 9 using webkit_glue::PasswordForm; |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 GetLogins(GetPasswordStore(0), form, actual_zero); | 70 GetLogins(GetPasswordStore(0), form, actual_zero); |
| 71 ASSERT_EQ(1U, actual_zero.size()); | 71 ASSERT_EQ(1U, actual_zero.size()); |
| 72 | 72 |
| 73 std::vector<PasswordForm> actual_one; | 73 std::vector<PasswordForm> actual_one; |
| 74 GetLogins(GetPasswordStore(1), form, actual_one); | 74 GetLogins(GetPasswordStore(1), form, actual_one); |
| 75 ASSERT_EQ(1U, actual_one.size()); | 75 ASSERT_EQ(1U, actual_one.size()); |
| 76 | 76 |
| 77 ASSERT_TRUE(ContainsSamePasswordForms(actual_zero, actual_one)); | 77 ASSERT_TRUE(ContainsSamePasswordForms(actual_zero, actual_one)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // TODO(sync): Remove FAILS_ annotation after http://crbug.com/59867 is fixed. |
| 81 #if defined(OS_MACOSX) |
| 82 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, FAILS_SetPassphrase) { |
| 83 #else |
| 80 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, SetPassphrase) { | 84 IN_PROC_BROWSER_TEST_F(TwoClientLivePasswordsSyncTest, SetPassphrase) { |
| 85 #endif |
| 81 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 86 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 82 GetClient(0)->service()->SetPassphrase(kValidPassphrase, true); | 87 GetClient(0)->service()->SetPassphrase(kValidPassphrase, true); |
| 83 GetClient(0)->AwaitPassphraseAccepted(); | 88 GetClient(0)->AwaitPassphraseAccepted(); |
| 84 GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)); | 89 GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)); |
| 85 ASSERT_TRUE(GetClient(1)->service()->observed_passphrase_required()); | 90 ASSERT_TRUE(GetClient(1)->service()->observed_passphrase_required()); |
| 86 GetClient(1)->service()->SetPassphrase(kValidPassphrase, true); | 91 GetClient(1)->service()->SetPassphrase(kValidPassphrase, true); |
| 87 GetClient(1)->AwaitPassphraseAccepted(); | 92 GetClient(1)->AwaitPassphraseAccepted(); |
| 88 ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required()); | 93 ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required()); |
| 89 } | 94 } |
| 90 | 95 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 112 ASSERT_EQ(1, GetClient(1)->GetLastSessionSnapshot()-> | 117 ASSERT_EQ(1, GetClient(1)->GetLastSessionSnapshot()-> |
| 113 num_conflicting_updates); | 118 num_conflicting_updates); |
| 114 | 119 |
| 115 GetClient(1)->service()->SetPassphrase(kValidPassphrase, true); | 120 GetClient(1)->service()->SetPassphrase(kValidPassphrase, true); |
| 116 GetClient(1)->AwaitPassphraseAccepted(); | 121 GetClient(1)->AwaitPassphraseAccepted(); |
| 117 ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required()); | 122 ASSERT_FALSE(GetClient(1)->service()->observed_passphrase_required()); |
| 118 GetClient(1)->AwaitSyncCycleCompletion("Accept passphrase and decrypt."); | 123 GetClient(1)->AwaitSyncCycleCompletion("Accept passphrase and decrypt."); |
| 119 ASSERT_EQ(0, GetClient(1)->GetLastSessionSnapshot()-> | 124 ASSERT_EQ(0, GetClient(1)->GetLastSessionSnapshot()-> |
| 120 num_conflicting_updates); | 125 num_conflicting_updates); |
| 121 } | 126 } |
| OLD | NEW |