| 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 <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/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/sync/internal_api/write_node.h" | 23 #include "chrome/browser/sync/internal_api/write_node.h" |
| 24 #include "chrome/browser/sync/internal_api/write_transaction.h" | 24 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 25 #include "chrome/browser/sync/profile_sync_factory.h" | 25 #include "chrome/browser/sync/profile_sync_factory.h" |
| 26 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 26 #include "chrome/browser/sync/profile_sync_factory_mock.h" |
| 27 #include "chrome/browser/sync/profile_sync_service.h" | 27 #include "chrome/browser/sync/profile_sync_service.h" |
| 28 #include "chrome/browser/sync/profile_sync_test_util.h" | 28 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 29 #include "chrome/browser/sync/protocol/password_specifics.pb.h" | 29 #include "chrome/browser/sync/protocol/password_specifics.pb.h" |
| 30 #include "chrome/browser/sync/syncable/directory_manager.h" | 30 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 31 #include "chrome/browser/sync/syncable/syncable.h" | 31 #include "chrome/browser/sync/syncable/syncable.h" |
| 32 #include "chrome/browser/sync/test_profile_sync_service.h" | 32 #include "chrome/browser/sync/test_profile_sync_service.h" |
| 33 #include "chrome/browser/sync/test/engine/test_id_factory.h" |
| 33 #include "chrome/common/chrome_notification_types.h" | 34 #include "chrome/common/chrome_notification_types.h" |
| 34 #include "chrome/common/net/gaia/gaia_constants.h" | 35 #include "chrome/common/net/gaia/gaia_constants.h" |
| 35 #include "chrome/common/pref_names.h" | 36 #include "chrome/common/pref_names.h" |
| 36 #include "chrome/test/base/profile_mock.h" | 37 #include "chrome/test/base/profile_mock.h" |
| 37 #include "chrome/test/sync/engine/test_id_factory.h" | |
| 38 #include "content/browser/browser_thread.h" | 38 #include "content/browser/browser_thread.h" |
| 39 #include "content/common/notification_observer_mock.h" | 39 #include "content/common/notification_observer_mock.h" |
| 40 #include "content/common/notification_source.h" | 40 #include "content/common/notification_source.h" |
| 41 #include "testing/gmock/include/gmock/gmock.h" | 41 #include "testing/gmock/include/gmock/gmock.h" |
| 42 #include "webkit/glue/password_form.h" | 42 #include "webkit/glue/password_form.h" |
| 43 | 43 |
| 44 using base::Time; | 44 using base::Time; |
| 45 using browser_sync::PasswordChangeProcessor; | 45 using browser_sync::PasswordChangeProcessor; |
| 46 using browser_sync::PasswordDataTypeController; | 46 using browser_sync::PasswordDataTypeController; |
| 47 using browser_sync::PasswordModelAssociator; | 47 using browser_sync::PasswordModelAssociator; |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 AddPasswordEntriesTask node_task(this, sync_forms); | 615 AddPasswordEntriesTask node_task(this, sync_forms); |
| 616 | 616 |
| 617 StartSyncService(&root_task, &node_task); | 617 StartSyncService(&root_task, &node_task); |
| 618 | 618 |
| 619 std::vector<PasswordForm> new_sync_forms; | 619 std::vector<PasswordForm> new_sync_forms; |
| 620 GetPasswordEntriesFromSyncDB(&new_sync_forms); | 620 GetPasswordEntriesFromSyncDB(&new_sync_forms); |
| 621 | 621 |
| 622 EXPECT_EQ(1U, new_sync_forms.size()); | 622 EXPECT_EQ(1U, new_sync_forms.size()); |
| 623 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); | 623 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); |
| 624 } | 624 } |
| OLD | NEW |