OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 6 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
8 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 8 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
9 #include "chrome/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
10 #include "sync/internal_api/public/engine/model_safe_worker.h" | 10 #include "sync/internal_api/public/engine/model_safe_worker.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 using sync_integration_test_util::AwaitPassphraseAccepted; | 28 using sync_integration_test_util::AwaitPassphraseAccepted; |
29 using sync_integration_test_util::AwaitPassphraseRequired; | 29 using sync_integration_test_util::AwaitPassphraseRequired; |
30 | 30 |
31 using autofill::PasswordForm; | 31 using autofill::PasswordForm; |
32 | 32 |
33 static const char* kValidPassphrase = "passphrase!"; | 33 static const char* kValidPassphrase = "passphrase!"; |
34 | 34 |
35 class TwoClientPasswordsSyncTest : public SyncTest { | 35 class TwoClientPasswordsSyncTest : public SyncTest { |
36 public: | 36 public: |
37 TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {} | 37 TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {} |
38 virtual ~TwoClientPasswordsSyncTest() {} | 38 ~TwoClientPasswordsSyncTest() override {} |
39 | 39 |
40 bool TestUsesSelfNotifications() override { return false; } | 40 bool TestUsesSelfNotifications() override { return false; } |
41 | 41 |
42 private: | 42 private: |
43 DISALLOW_COPY_AND_ASSIGN(TwoClientPasswordsSyncTest); | 43 DISALLOW_COPY_AND_ASSIGN(TwoClientPasswordsSyncTest); |
44 }; | 44 }; |
45 | 45 |
46 // TCM ID - 3732277 | 46 // TCM ID - 3732277 |
47 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, Add) { | 47 IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, Add) { |
48 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 48 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 PasswordForm form0 = CreateTestPasswordForm(0); | 170 PasswordForm form0 = CreateTestPasswordForm(0); |
171 AddLogin(GetPasswordStore(0), form0); | 171 AddLogin(GetPasswordStore(0), form0); |
172 PasswordForm form1 = CreateTestPasswordForm(1); | 172 PasswordForm form1 = CreateTestPasswordForm(1); |
173 AddLogin(GetPasswordStore(1), form1); | 173 AddLogin(GetPasswordStore(1), form1); |
174 PasswordForm form2 = CreateTestPasswordForm(2); | 174 PasswordForm form2 = CreateTestPasswordForm(2); |
175 AddLogin(GetPasswordStore(1), form2); | 175 AddLogin(GetPasswordStore(1), form2); |
176 | 176 |
177 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); | 177 ASSERT_TRUE(AwaitAllProfilesContainSamePasswordForms()); |
178 ASSERT_EQ(3, GetPasswordCount(0)); | 178 ASSERT_EQ(3, GetPasswordCount(0)); |
179 } | 179 } |
OLD | NEW |