| 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 "chrome/browser/password_manager/password_form_data.h" | 5 #include "chrome/browser/password_manager/password_form_data.h" |
| 6 #include "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.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 |
| 11 // TODO(rsimha): See http://crbug.com/78840. | 11 IN_PROC_BROWSER_TEST_F(SingleClientLivePasswordsSyncTest, Sanity) { |
| 12 IN_PROC_BROWSER_TEST_F(SingleClientLivePasswordsSyncTest, FLAKY_Sanity) { | |
| 13 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 12 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 14 | 13 |
| 15 PasswordForm form = CreateTestPasswordForm(0); | 14 PasswordForm form = CreateTestPasswordForm(0); |
| 16 AddLogin(GetVerifierPasswordStore(), form); | 15 AddLogin(GetVerifierPasswordStore(), form); |
| 17 | 16 |
| 18 std::vector<PasswordForm> verifier_forms; | 17 std::vector<PasswordForm> verifier_forms; |
| 19 GetLogins(GetVerifierPasswordStore(), verifier_forms); | 18 GetLogins(GetVerifierPasswordStore(), verifier_forms); |
| 20 EXPECT_EQ(1U, verifier_forms.size()); | 19 EXPECT_EQ(1U, verifier_forms.size()); |
| 21 | 20 |
| 22 AddLogin(GetPasswordStore(0), form); | 21 AddLogin(GetPasswordStore(0), form); |
| 23 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Added a login.")); | 22 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Added a login.")); |
| 24 | 23 |
| 25 std::vector<PasswordForm> forms0; | 24 std::vector<PasswordForm> forms0; |
| 26 GetLogins(GetPasswordStore(0), forms0); | 25 GetLogins(GetPasswordStore(0), forms0); |
| 27 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms0)); | 26 ASSERT_TRUE(ContainsSamePasswordForms(verifier_forms, forms0)); |
| 28 } | 27 } |
| OLD | NEW |