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/profile_sync_service_harness.h" | 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 using autofill::PasswordForm; | 28 using autofill::PasswordForm; |
29 | 29 |
30 static const char* kValidPassphrase = "passphrase!"; | 30 static const char* kValidPassphrase = "passphrase!"; |
31 static const char* kAnotherValidPassphrase = "Mot de passe!"; | 31 static const char* kAnotherValidPassphrase = "Mot de passe!"; |
32 | 32 |
33 class MultipleClientPasswordsSyncTest : public SyncTest { | 33 class MultipleClientPasswordsSyncTest : public SyncTest { |
34 public: | 34 public: |
35 MultipleClientPasswordsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} | 35 MultipleClientPasswordsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} |
36 virtual ~MultipleClientPasswordsSyncTest() {} | 36 virtual ~MultipleClientPasswordsSyncTest() {} |
37 | 37 |
38 virtual bool TestUsesSelfNotifications() override { | 38 bool TestUsesSelfNotifications() override { return false; } |
39 return false; | |
40 } | |
41 | 39 |
42 private: | 40 private: |
43 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); | 41 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); |
44 }; | 42 }; |
45 | 43 |
46 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { | 44 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { |
47 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 45 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
48 | 46 |
49 for (int i = 0; i < num_clients(); ++i) { | 47 for (int i = 0; i < num_clients(); ++i) { |
50 PasswordForm form = CreateTestPasswordForm(i); | 48 PasswordForm form = CreateTestPasswordForm(i); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); | 132 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); |
135 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); | 133 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); |
136 | 134 |
137 // For some reason, the tests won't pass unless these flags are set. | 135 // For some reason, the tests won't pass unless these flags are set. |
138 GetSyncService(2)->SetSetupInProgress(false); | 136 GetSyncService(2)->SetSetupInProgress(false); |
139 GetSyncService(2)->SetSyncSetupCompleted(); | 137 GetSyncService(2)->SetSyncSetupCompleted(); |
140 | 138 |
141 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); | 139 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); |
142 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 140 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
143 } | 141 } |
OLD | NEW |