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 virtual bool TestUsesSelfNotifications() override { |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
42 private: | 42 private: |
43 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); | 43 DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); |
44 }; | 44 }; |
45 | 45 |
46 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { | 46 IN_PROC_BROWSER_TEST_F(MultipleClientPasswordsSyncTest, Sanity) { |
47 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 47 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
48 | 48 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); | 134 ASSERT_TRUE(SetDecryptionPassphrase(2, kValidPassphrase)); |
135 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); | 135 ASSERT_TRUE(AwaitPassphraseAccepted(GetSyncService(2))); |
136 | 136 |
137 // For some reason, the tests won't pass unless these flags are set. | 137 // For some reason, the tests won't pass unless these flags are set. |
138 GetSyncService(2)->SetSetupInProgress(false); | 138 GetSyncService(2)->SetSetupInProgress(false); |
139 GetSyncService(2)->SetSyncSetupCompleted(); | 139 GetSyncService(2)->SetSyncSetupCompleted(); |
140 | 140 |
141 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); | 141 ASSERT_TRUE(AwaitProfileContainsSamePasswordFormsAsVerifier(2)); |
142 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); | 142 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); |
143 } | 143 } |
OLD | NEW |