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

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

Issue 10147003: [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win update errors Created 8 years, 8 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 | Annotate | Revision Log
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 <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"
11 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
12 #include "base/test/test_timeouts.h" 12 #include "base/test/test_timeouts.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/password_manager/mock_password_store.h" 15 #include "chrome/browser/password_manager/mock_password_store.h"
16 #include "chrome/browser/password_manager/password_store.h" 16 #include "chrome/browser/password_manager/password_store.h"
17 #include "chrome/browser/password_manager/password_store_factory.h" 17 #include "chrome/browser/password_manager/password_store_factory.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/signin/signin_manager.h" 19 #include "chrome/browser/signin/signin_manager.h"
20 #include "chrome/browser/signin/signin_manager_factory.h" 20 #include "chrome/browser/signin/signin_manager_factory.h"
21 #include "chrome/browser/signin/token_service_factory.h" 21 #include "chrome/browser/signin/token_service_factory.h"
22 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 22 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
23 #include "chrome/browser/sync/glue/password_change_processor.h" 23 #include "chrome/browser/sync/glue/password_change_processor.h"
24 #include "chrome/browser/sync/glue/password_data_type_controller.h" 24 #include "chrome/browser/sync/glue/password_data_type_controller.h"
25 #include "chrome/browser/sync/glue/password_model_associator.h" 25 #include "chrome/browser/sync/glue/password_model_associator.h"
26 #include "chrome/browser/sync/internal_api/read_node.h"
27 #include "chrome/browser/sync/internal_api/read_transaction.h"
28 #include "chrome/browser/sync/internal_api/write_node.h"
29 #include "chrome/browser/sync/internal_api/write_transaction.h"
30 #include "chrome/browser/sync/profile_sync_components_factory.h" 26 #include "chrome/browser/sync/profile_sync_components_factory.h"
31 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 27 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
32 #include "chrome/browser/sync/profile_sync_service.h" 28 #include "chrome/browser/sync/profile_sync_service.h"
33 #include "chrome/browser/sync/profile_sync_test_util.h" 29 #include "chrome/browser/sync/profile_sync_test_util.h"
34 #include "chrome/browser/sync/test_profile_sync_service.h" 30 #include "chrome/browser/sync/test_profile_sync_service.h"
35 #include "chrome/common/chrome_notification_types.h" 31 #include "chrome/common/chrome_notification_types.h"
36 #include "chrome/common/net/gaia/gaia_constants.h" 32 #include "chrome/common/net/gaia/gaia_constants.h"
37 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
38 #include "chrome/test/base/profile_mock.h" 34 #include "chrome/test/base/profile_mock.h"
39 #include "content/public/browser/notification_source.h" 35 #include "content/public/browser/notification_source.h"
40 #include "content/test/notification_observer_mock.h" 36 #include "content/test/notification_observer_mock.h"
41 #include "content/test/test_browser_thread.h" 37 #include "content/test/test_browser_thread.h"
38 #include "sync/internal_api/read_node.h"
39 #include "sync/internal_api/read_transaction.h"
40 #include "sync/internal_api/write_node.h"
41 #include "sync/internal_api/write_transaction.h"
42 #include "sync/protocol/password_specifics.pb.h" 42 #include "sync/protocol/password_specifics.pb.h"
43 #include "sync/syncable/syncable.h" 43 #include "sync/syncable/syncable.h"
44 #include "sync/test/engine/test_id_factory.h" 44 #include "sync/test/engine/test_id_factory.h"
45 #include "testing/gmock/include/gmock/gmock.h" 45 #include "testing/gmock/include/gmock/gmock.h"
46 #include "webkit/forms/password_form.h" 46 #include "webkit/forms/password_form.h"
47 47
48 using base::Time; 48 using base::Time;
49 using browser_sync::PasswordChangeProcessor; 49 using browser_sync::PasswordChangeProcessor;
50 using browser_sync::PasswordDataTypeController; 50 using browser_sync::PasswordDataTypeController;
51 using browser_sync::PasswordModelAssociator; 51 using browser_sync::PasswordModelAssociator;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 CreateRootHelper create_root(this, syncable::PASSWORDS); 589 CreateRootHelper create_root(this, syncable::PASSWORDS);
590 StartSyncService(create_root.callback(), 590 StartSyncService(create_root.callback(),
591 base::Bind(&AddPasswordEntriesCallback, this, sync_forms)); 591 base::Bind(&AddPasswordEntriesCallback, this, sync_forms));
592 592
593 std::vector<PasswordForm> new_sync_forms; 593 std::vector<PasswordForm> new_sync_forms;
594 GetPasswordEntriesFromSyncDB(&new_sync_forms); 594 GetPasswordEntriesFromSyncDB(&new_sync_forms);
595 595
596 EXPECT_EQ(1U, new_sync_forms.size()); 596 EXPECT_EQ(1U, new_sync_forms.size());
597 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 597 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
598 } 598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698