Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.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 "sync/internal_api/public/engine/model_safe_worker.h" 9 #include "sync/internal_api/public/engine/model_safe_worker.h"
10 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 10 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
11 11
12 using passwords_helper::AddLogin; 12 using passwords_helper::AddLogin;
13 using passwords_helper::AllProfilesContainSamePasswordForms; 13 using passwords_helper::AllProfilesContainSamePasswordForms;
14 using passwords_helper::AllProfilesContainSamePasswordFormsAsVerifier; 14 using passwords_helper::AllProfilesContainSamePasswordFormsAsVerifier;
15 using passwords_helper::CreateTestPasswordForm; 15 using passwords_helper::CreateTestPasswordForm;
16 using passwords_helper::GetPasswordCount; 16 using passwords_helper::GetPasswordCount;
17 using passwords_helper::GetPasswordStore; 17 using passwords_helper::GetPasswordStore;
18 using passwords_helper::GetVerifierPasswordCount; 18 using passwords_helper::GetVerifierPasswordCount;
19 using passwords_helper::GetVerifierPasswordStore; 19 using passwords_helper::GetVerifierPasswordStore;
20 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier; 20 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier;
21 using passwords_helper::RemoveLogin; 21 using passwords_helper::RemoveLogin;
22 using passwords_helper::RemoveLogins; 22 using passwords_helper::RemoveLogins;
23 using passwords_helper::SetDecryptionPassphrase; 23 using passwords_helper::SetDecryptionPassphrase;
24 using passwords_helper::SetEncryptionPassphrase; 24 using passwords_helper::SetEncryptionPassphrase;
25 using passwords_helper::UpdateLogin; 25 using passwords_helper::UpdateLogin;
26 26
27 using content::PasswordForm; 27 using autofill::PasswordForm;
28 28
29 static const char* kValidPassphrase = "passphrase!"; 29 static const char* kValidPassphrase = "passphrase!";
30 static const char* kAnotherValidPassphrase = "another passphrase!"; 30 static const char* kAnotherValidPassphrase = "another passphrase!";
31 31
32 class TwoClientPasswordsSyncTest : public SyncTest { 32 class TwoClientPasswordsSyncTest : public SyncTest {
33 public: 33 public:
34 TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {} 34 TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {}
35 virtual ~TwoClientPasswordsSyncTest() {} 35 virtual ~TwoClientPasswordsSyncTest() {}
36 36
37 private: 37 private:
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier()); 279 ASSERT_FALSE(AllProfilesContainSamePasswordFormsAsVerifier());
280 280
281 // Update 1 with the correct passphrase, the password should now sync over. 281 // Update 1 with the correct passphrase, the password should now sync over.
282 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired()); 282 ASSERT_TRUE(GetClient(1)->AwaitPassphraseRequired());
283 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase)); 283 ASSERT_TRUE(SetDecryptionPassphrase(1, kValidPassphrase));
284 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted()); 284 ASSERT_TRUE(GetClient(1)->AwaitPassphraseAccepted());
285 285
286 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 286 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
287 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier()); 287 ASSERT_TRUE(AllProfilesContainSamePasswordFormsAsVerifier());
288 } 288 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698