| 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/test/live_sync/live_passwords_sync_test.h" | 6 #include "chrome/test/live_sync/live_passwords_sync_test.h" |
| 7 | 7 |
| 8 using webkit_glue::PasswordForm; | 8 using webkit_glue::PasswordForm; |
| 9 | 9 |
| 10 // TODO(sync): Remove FAILS_ annotation after http://crbug.com/59867 is fixed. | 10 // TODO(rsimha): Enable once http://crbug.com/69604 is fixed. |
| 11 #if defined(OS_MACOSX) | 11 IN_PROC_BROWSER_TEST_F(ManyClientLivePasswordsSyncTest, DISABLED_Sanity) { |
| 12 IN_PROC_BROWSER_TEST_F(ManyClientLivePasswordsSyncTest, FAILS_Sanity) { | |
| 13 #else | |
| 14 IN_PROC_BROWSER_TEST_F(ManyClientLivePasswordsSyncTest, Sanity) { | |
| 15 #endif | |
| 16 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 12 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 17 | 13 |
| 18 PasswordForm form; | 14 PasswordForm form; |
| 19 form.origin = GURL("http://www.google.com/"); | 15 form.origin = GURL("http://www.google.com/"); |
| 20 form.username_value = ASCIIToUTF16("username"); | 16 form.username_value = ASCIIToUTF16("username"); |
| 21 form.password_value = ASCIIToUTF16("password"); | 17 form.password_value = ASCIIToUTF16("password"); |
| 22 | 18 |
| 23 AddLogin(GetVerifierPasswordStore(), form); | 19 AddLogin(GetVerifierPasswordStore(), form); |
| 24 AddLogin(GetPasswordStore(0), form); | 20 AddLogin(GetPasswordStore(0), form); |
| 25 | 21 |
| 26 ASSERT_TRUE(GetClient(0)->AwaitGroupSyncCycleCompletion(clients())); | 22 ASSERT_TRUE(GetClient(0)->AwaitGroupSyncCycleCompletion(clients())); |
| 27 | 23 |
| 28 std::vector<PasswordForm> expected; | 24 std::vector<PasswordForm> expected; |
| 29 GetLogins(GetVerifierPasswordStore(), form, expected); | 25 GetLogins(GetVerifierPasswordStore(), form, expected); |
| 30 ASSERT_EQ(1U, expected.size()); | 26 ASSERT_EQ(1U, expected.size()); |
| 31 | 27 |
| 32 for (int i = 0; i < num_clients(); ++i) { | 28 for (int i = 0; i < num_clients(); ++i) { |
| 33 std::vector<PasswordForm> actual; | 29 std::vector<PasswordForm> actual; |
| 34 GetLogins(GetPasswordStore(i), form, actual); | 30 GetLogins(GetPasswordStore(i), form, actual); |
| 35 | 31 |
| 36 ASSERT_TRUE(ContainsSamePasswordForms(expected, actual)); | 32 ASSERT_TRUE(ContainsSamePasswordForms(expected, actual)); |
| 37 } | 33 } |
| 38 } | 34 } |
| OLD | NEW |