| 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/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 7 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
| 8 #include "chrome/browser/sync/test/integration/sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 9 #include "components/password_manager/core/browser/password_form_data.h" | 9 #include "components/password_manager/core/browser/password_form_data.h" |
| 10 | 10 |
| 11 using passwords_helper::AddLogin; | 11 using passwords_helper::AddLogin; |
| 12 using passwords_helper::AwaitAllProfilesContainSamePasswordForms; | 12 using passwords_helper::AwaitAllProfilesContainSamePasswordForms; |
| 13 using passwords_helper::CreateTestPasswordForm; | 13 using passwords_helper::CreateTestPasswordForm; |
| 14 using passwords_helper::GetPasswordCount; | 14 using passwords_helper::GetPasswordCount; |
| 15 using passwords_helper::GetPasswordStore; | 15 using passwords_helper::GetPasswordStore; |
| 16 | 16 |
| 17 using autofill::PasswordForm; | 17 using autofill::PasswordForm; |
| 18 | 18 |
| 19 class MultipleClientPasswordsSyncTest : public SyncTest { | 19 class MultipleClientPasswordsSyncTest : public SyncTest { |
| 20 public: | 20 public: |
| 21 MultipleClientPasswordsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} | 21 MultipleClientPasswordsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} |
| 22 virtual ~MultipleClientPasswordsSyncTest() {} | 22 virtual ~MultipleClientPasswordsSyncTest() {} |
| 23 | 23 |
| 24 virtual bool TestUsesSelfNotifications() OVERRIDE { |
| 25 return false; |
| 26 } |
| 27 |
| 24 private: | 28 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); | 29 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); |
| 26 }; | 30 }; |
| 27 | 31 |
| 28 // This test was flaky on the Mac buildbot and also appears to be flaky | 32 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { |
| 29 // in local Linux (debug) builds. See crbug.com/363247. | |
| 30 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, DISABLED_Sanity) { | |
| 31 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 33 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 32 | 34 |
| 33 for (int i = 0; i < num_clients(); ++i) { | 35 for (int i = 0; i < num_clients(); ++i) { |
| 34 PasswordForm form = CreateTestPasswordForm(i); | 36 PasswordForm form = CreateTestPasswordForm(i); |
| 35 AddLogin(GetPasswordStore(i), form); | 37 AddLogin(GetPasswordStore(i), form); |
| 36 } | 38 } |
| 37 | 39 |
| 38 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); | 40 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); |
| 39 ASSERT_EQ(num_clients(), GetPasswordCount(0)); | 41 ASSERT_EQ(num_clients(), GetPasswordCount(0)); |
| 40 } | 42 } |
| OLD | NEW |