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 15 matching lines...) Expand all Loading... |
26 using sync_integration_test_util::AwaitPassphraseRequired; | 26 using sync_integration_test_util::AwaitPassphraseRequired; |
27 | 27 |
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 ~MultipleClientPasswordsSyncTest() override {} |
37 | 37 |
38 bool TestUsesSelfNotifications() override { return false; } | 38 bool TestUsesSelfNotifications() override { return false; } |
39 | 39 |
40 private: | 40 private: |
41 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); | 41 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); |
42 }; | 42 }; |
43 | 43 |
44 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { | 44 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { |
45 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 45 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
46 | 46 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); | 132 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); |
133 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); | 133 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); |
134 | 134 |
135 // 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. |
136 GetSyncService(2)->SetSetupInProgress(false); | 136 GetSyncService(2)->SetSetupInProgress(false); |
137 GetSyncService(2)->SetSyncSetupCompleted(); | 137 GetSyncService(2)->SetSyncSetupCompleted(); |
138 | 138 |
139 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); | 139 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); |
140 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 140 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
141 } | 141 } |
OLD | NEW |