| 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/stringprintf.h" | 5 #include "base/stringprintf.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/password_manager/password_form_data.h" | 7 #include "chrome/browser/password_manager/password_form_data.h" |
| 8 #include "chrome/test/live_sync/live_passwords_sync_test.h" | 8 #include "chrome/test/live_sync/live_passwords_sync_test.h" |
| 9 | 9 |
| 10 using webkit_glue::PasswordForm; | 10 using webkit_glue::PasswordForm; |
| 11 | 11 |
| 12 // TODO(rsimha): This test fails intermittently -- see http://crbug.com/77993. | 12 IN_PROC_BROWSER_TEST_F(MultipleClientLivePasswordsSyncTest, Sanity) { |
| 13 IN_PROC_BROWSER_TEST_F(MultipleClientLivePasswordsSyncTest, FAILS_Sanity) { | |
| 14 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 13 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 15 | 14 |
| 16 for (int i = 0; i < num_clients(); ++i) { | 15 for (int i = 0; i < num_clients(); ++i) { |
| 17 PasswordForm form = CreateTestPasswordForm(i); | 16 PasswordForm form = CreateTestPasswordForm(i); |
| 18 AddLogin(GetPasswordStore(i), form); | 17 AddLogin(GetPasswordStore(i), form); |
| 19 } | 18 } |
| 20 ASSERT_TRUE(AwaitQuiescence()); | 19 ASSERT_TRUE(AwaitQuiescence()); |
| 21 | 20 |
| 22 std::vector<PasswordForm> forms0; | 21 std::vector<PasswordForm> forms0; |
| 23 GetLogins(GetPasswordStore(0), forms0); | 22 GetLogins(GetPasswordStore(0), forms0); |
| 24 ASSERT_EQ((size_t) num_clients(), forms0.size()); | 23 ASSERT_EQ((size_t) num_clients(), forms0.size()); |
| 25 | 24 |
| 26 for (int i = 1; i < num_clients(); ++i) { | 25 for (int i = 1; i < num_clients(); ++i) { |
| 27 std::vector<PasswordForm> forms; | 26 std::vector<PasswordForm> forms; |
| 28 GetLogins(GetPasswordStore(i), forms); | 27 GetLogins(GetPasswordStore(i), forms); |
| 29 ASSERT_TRUE(ContainsSamePasswordForms(forms0, forms)); | 28 ASSERT_TRUE(ContainsSamePasswordForms(forms0, forms)); |
| 30 } | 29 } |
| 31 } | 30 } |
| OLD | NEW |