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. |
| 11 #if defined(OS_MACOSX) |
| 12 IN_PROC_BROWSER_TEST_F(SingleClientLivePasswordsSyncTest, FAILS_Sanity) { |
| 13 #else |
10 IN_PROC_BROWSER_TEST_F(SingleClientLivePasswordsSyncTest, Sanity) { | 14 IN_PROC_BROWSER_TEST_F(SingleClientLivePasswordsSyncTest, Sanity) { |
| 15 #endif |
11 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 16 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
12 | 17 |
13 PasswordForm form; | 18 PasswordForm form; |
14 form.origin = GURL("http://www.google.com/"); | 19 form.origin = GURL("http://www.google.com/"); |
15 form.username_value = ASCIIToUTF16("username"); | 20 form.username_value = ASCIIToUTF16("username"); |
16 form.password_value = ASCIIToUTF16("password"); | 21 form.password_value = ASCIIToUTF16("password"); |
17 | 22 |
18 AddLogin(GetVerifierPasswordStore(), form); | 23 AddLogin(GetVerifierPasswordStore(), form); |
19 AddLogin(GetPasswordStore(0), form); | 24 AddLogin(GetPasswordStore(0), form); |
20 | 25 |
21 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( | 26 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( |
22 "Waiting for passwords change.")); | 27 "Waiting for passwords change.")); |
23 | 28 |
24 std::vector<PasswordForm> expected; | 29 std::vector<PasswordForm> expected; |
25 GetLogins(GetVerifierPasswordStore(), form, expected); | 30 GetLogins(GetVerifierPasswordStore(), form, expected); |
26 ASSERT_EQ(1U, expected.size()); | 31 ASSERT_EQ(1U, expected.size()); |
27 | 32 |
28 std::vector<PasswordForm> actual; | 33 std::vector<PasswordForm> actual; |
29 GetLogins(GetPasswordStore(0), form, actual); | 34 GetLogins(GetPasswordStore(0), form, actual); |
30 ASSERT_TRUE(ContainsSamePasswordForms(expected, actual)); | 35 ASSERT_TRUE(ContainsSamePasswordForms(expected, actual)); |
31 } | 36 } |
OLD | NEW |