| OLD | NEW |
| 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 // TODO(akalin): This file is basically just a unit test for | 5 // TODO(akalin): This file is basically just a unit test for |
| 6 // BookmarkChangeProcessor. Write unit tests for | 6 // BookmarkChangeProcessor. Write unit tests for |
| 7 // BookmarkModelAssociator separately. | 7 // BookmarkModelAssociator separately. |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } | 375 } |
| 376 | 376 |
| 377 void StartSync() { | 377 void StartSync() { |
| 378 test_user_share_.Reload(); | 378 test_user_share_.Reload(); |
| 379 | 379 |
| 380 ASSERT_TRUE(CreatePermanentBookmarkNodes()); | 380 ASSERT_TRUE(CreatePermanentBookmarkNodes()); |
| 381 | 381 |
| 382 // Set up model associator. | 382 // Set up model associator. |
| 383 model_associator_.reset(new BookmarkModelAssociator( | 383 model_associator_.reset(new BookmarkModelAssociator( |
| 384 BookmarkModelFactory::GetForProfile(&profile_), | 384 BookmarkModelFactory::GetForProfile(&profile_), |
| 385 &profile_, |
| 385 test_user_share_.user_share(), | 386 test_user_share_.user_share(), |
| 386 &mock_error_handler_, | 387 &mock_error_handler_, |
| 387 kExpectMobileBookmarks)); | 388 kExpectMobileBookmarks)); |
| 388 | 389 |
| 389 local_merge_result_ = syncer::SyncMergeResult(syncer::BOOKMARKS); | 390 local_merge_result_ = syncer::SyncMergeResult(syncer::BOOKMARKS); |
| 390 syncer_merge_result_ = syncer::SyncMergeResult(syncer::BOOKMARKS); | 391 syncer_merge_result_ = syncer::SyncMergeResult(syncer::BOOKMARKS); |
| 391 int local_count_before = model_->root_node()->GetTotalNodeCount(); | 392 int local_count_before = model_->root_node()->GetTotalNodeCount(); |
| 392 int syncer_count_before = GetSyncBookmarkCount(); | 393 int syncer_count_before = GetSyncBookmarkCount(); |
| 393 | 394 |
| 394 syncer::SyncError error = model_associator_->AssociateModels( | 395 syncer::SyncError error = model_associator_->AssociateModels( |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 new_versions[changed_bookmark->id()]); | 1833 new_versions[changed_bookmark->id()]); |
| 1833 initial_versions.erase(changed_bookmark->id()); | 1834 initial_versions.erase(changed_bookmark->id()); |
| 1834 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions); | 1835 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions); |
| 1835 ExpectTransactionVersionMatch(model_->other_node(), initial_versions); | 1836 ExpectTransactionVersionMatch(model_->other_node(), initial_versions); |
| 1836 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions); | 1837 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions); |
| 1837 } | 1838 } |
| 1838 | 1839 |
| 1839 } // namespace | 1840 } // namespace |
| 1840 | 1841 |
| 1841 } // namespace browser_sync | 1842 } // namespace browser_sync |
| OLD | NEW |