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

Side by Side Diff: chrome/browser/sync/profile_sync_service_password_unittest.cc

Issue 8680040: Group forms-related files in webkit/glue in a forms/ subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + another build fix Created 9 years 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 | Annotate | Revision Log
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 22 matching lines...) Expand all
33 #include "chrome/browser/sync/test/engine/test_id_factory.h" 33 #include "chrome/browser/sync/test/engine/test_id_factory.h"
34 #include "chrome/browser/sync/test_profile_sync_service.h" 34 #include "chrome/browser/sync/test_profile_sync_service.h"
35 #include "chrome/common/chrome_notification_types.h" 35 #include "chrome/common/chrome_notification_types.h"
36 #include "chrome/common/net/gaia/gaia_constants.h" 36 #include "chrome/common/net/gaia/gaia_constants.h"
37 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
38 #include "chrome/test/base/profile_mock.h" 38 #include "chrome/test/base/profile_mock.h"
39 #include "content/public/browser/notification_source.h" 39 #include "content/public/browser/notification_source.h"
40 #include "content/test/notification_observer_mock.h" 40 #include "content/test/notification_observer_mock.h"
41 #include "content/test/test_browser_thread.h" 41 #include "content/test/test_browser_thread.h"
42 #include "testing/gmock/include/gmock/gmock.h" 42 #include "testing/gmock/include/gmock/gmock.h"
43 #include "webkit/glue/password_form.h" 43 #include "webkit/forms/password_form.h"
44 44
45 using base::Time; 45 using base::Time;
46 using browser_sync::PasswordChangeProcessor; 46 using browser_sync::PasswordChangeProcessor;
47 using browser_sync::PasswordDataTypeController; 47 using browser_sync::PasswordDataTypeController;
48 using browser_sync::PasswordModelAssociator; 48 using browser_sync::PasswordModelAssociator;
49 using browser_sync::TestIdFactory; 49 using browser_sync::TestIdFactory;
50 using browser_sync::UnrecoverableErrorHandler; 50 using browser_sync::UnrecoverableErrorHandler;
51 using content::BrowserThread; 51 using content::BrowserThread;
52 using sync_api::SyncManager; 52 using sync_api::SyncManager;
53 using sync_api::UserShare; 53 using sync_api::UserShare;
(...skipping 16 matching lines...) Expand all
70 using testing::AtLeast; 70 using testing::AtLeast;
71 using testing::DoAll; 71 using testing::DoAll;
72 using testing::DoDefault; 72 using testing::DoDefault;
73 using testing::ElementsAre; 73 using testing::ElementsAre;
74 using testing::Eq; 74 using testing::Eq;
75 using testing::Invoke; 75 using testing::Invoke;
76 using testing::InvokeWithoutArgs; 76 using testing::InvokeWithoutArgs;
77 using testing::Return; 77 using testing::Return;
78 using testing::SaveArg; 78 using testing::SaveArg;
79 using testing::SetArgumentPointee; 79 using testing::SetArgumentPointee;
80 using webkit_glue::PasswordForm; 80 using webkit::forms::PasswordForm;
81 81
82 ACTION_P3(MakePasswordSyncComponents, service, ps, dtc) { 82 ACTION_P3(MakePasswordSyncComponents, service, ps, dtc) {
83 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 83 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
84 PasswordModelAssociator* model_associator = 84 PasswordModelAssociator* model_associator =
85 new PasswordModelAssociator(service, ps); 85 new PasswordModelAssociator(service, ps);
86 PasswordChangeProcessor* change_processor = 86 PasswordChangeProcessor* change_processor =
87 new PasswordChangeProcessor(model_associator, ps, dtc); 87 new PasswordChangeProcessor(model_associator, ps, dtc);
88 return ProfileSyncComponentsFactory::SyncComponents(model_associator, 88 return ProfileSyncComponentsFactory::SyncComponents(model_associator,
89 change_processor); 89 change_processor);
90 } 90 }
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 CreateRootHelper create_root(this, syncable::PASSWORDS); 608 CreateRootHelper create_root(this, syncable::PASSWORDS);
609 StartSyncService(create_root.callback(), 609 StartSyncService(create_root.callback(),
610 base::Bind(&AddPasswordEntriesCallback, this, sync_forms)); 610 base::Bind(&AddPasswordEntriesCallback, this, sync_forms));
611 611
612 std::vector<PasswordForm> new_sync_forms; 612 std::vector<PasswordForm> new_sync_forms;
613 GetPasswordEntriesFromSyncDB(&new_sync_forms); 613 GetPasswordEntriesFromSyncDB(&new_sync_forms);
614 614
615 EXPECT_EQ(1U, new_sync_forms.size()); 615 EXPECT_EQ(1U, new_sync_forms.size());
616 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 616 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
617 } 617 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.cc ('k') | chrome/browser/sync/test/integration/autofill_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698