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 "chrome/browser/sync/backend_migrator.h" | 5 #include "chrome/browser/sync/backend_migrator.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/tracked_objects.h" | 8 #include "base/tracked_objects.h" |
9 #include "chrome/browser/sync/glue/data_type_manager_mock.h" | 9 #include "chrome/browser/sync/glue/data_type_manager_mock.h" |
10 #include "chrome/browser/sync/internal_api/write_transaction.h" | 10 #include "chrome/browser/sync/internal_api/write_transaction.h" |
11 #include "chrome/browser/sync/profile_sync_service_mock.h" | 11 #include "chrome/browser/sync/profile_sync_service_mock.h" |
12 #include "chrome/browser/sync/protocol/sync.pb.h" | 12 #include "chrome/browser/sync/protocol/sync.pb.h" |
13 #include "chrome/browser/sync/sessions/session_state.h" | 13 #include "chrome/browser/sync/sessions/session_state.h" |
14 #include "chrome/browser/sync/syncable/directory_manager.h" | 14 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 15 #include "chrome/browser/sync/test/engine/test_user_share.h" |
15 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
16 #include "chrome/test/sync/engine/test_user_share.h" | |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using ::testing::_; | 20 using ::testing::_; |
21 using ::testing::Eq; | 21 using ::testing::Eq; |
22 using ::testing::Mock; | 22 using ::testing::Mock; |
23 using ::testing::NiceMock; | 23 using ::testing::NiceMock; |
24 using ::testing::Return; | 24 using ::testing::Return; |
25 using ::testing::SetArgumentPointee; | 25 using ::testing::SetArgumentPointee; |
26 | 26 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 .WillOnce(Return(DataTypeManager::CONFIGURED)); | 322 .WillOnce(Return(DataTypeManager::CONFIGURED)); |
323 EXPECT_CALL(*manager(), Configure(_, sync_api::CONFIGURE_REASON_MIGRATION)) | 323 EXPECT_CALL(*manager(), Configure(_, sync_api::CONFIGURE_REASON_MIGRATION)) |
324 .Times(1); | 324 .Times(1); |
325 migrator()->MigrateTypes(to_migrate); | 325 migrator()->MigrateTypes(to_migrate); |
326 SetUnsyncedTypes(syncable::ModelTypeSet()); | 326 SetUnsyncedTypes(syncable::ModelTypeSet()); |
327 SendConfigureDone(DataTypeManager::ABORTED, syncable::ModelTypeSet()); | 327 SendConfigureDone(DataTypeManager::ABORTED, syncable::ModelTypeSet()); |
328 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state()); | 328 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state()); |
329 } | 329 } |
330 | 330 |
331 }; // namespace browser_sync | 331 }; // namespace browser_sync |
OLD | NEW |