| 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> |
| 11 #include <stack> | 11 #include <stack> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/location.h" | 16 #include "base/location.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/message_loop/message_loop.h" | 18 #include "base/message_loop/message_loop.h" |
| 19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
| 20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
| 23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 24 #include "base/time/time.h" | 24 #include "base/time/time.h" |
| 25 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 25 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 26 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 26 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| 27 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 27 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
| 28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
| 29 #include "chrome/test/base/testing_profile.h" | 29 #include "chrome/test/base/testing_profile.h" |
| 30 #include "components/bookmarks/core/browser/base_bookmark_model_observer.h" | 30 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
| 31 #include "components/bookmarks/core/browser/bookmark_model.h" | 31 #include "components/bookmarks/browser/bookmark_model.h" |
| 32 #include "components/bookmarks/core/test/bookmark_test_helpers.h" | 32 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 33 #include "components/sync_driver/data_type_error_handler.h" | 33 #include "components/sync_driver/data_type_error_handler.h" |
| 34 #include "components/sync_driver/data_type_error_handler_mock.h" | 34 #include "components/sync_driver/data_type_error_handler_mock.h" |
| 35 #include "content/public/test/test_browser_thread.h" | 35 #include "content/public/test/test_browser_thread.h" |
| 36 #include "sync/api/sync_error.h" | 36 #include "sync/api/sync_error.h" |
| 37 #include "sync/internal_api/public/change_record.h" | 37 #include "sync/internal_api/public/change_record.h" |
| 38 #include "sync/internal_api/public/read_node.h" | 38 #include "sync/internal_api/public/read_node.h" |
| 39 #include "sync/internal_api/public/read_transaction.h" | 39 #include "sync/internal_api/public/read_transaction.h" |
| 40 #include "sync/internal_api/public/test/test_user_share.h" | 40 #include "sync/internal_api/public/test/test_user_share.h" |
| 41 #include "sync/internal_api/public/write_node.h" | 41 #include "sync/internal_api/public/write_node.h" |
| 42 #include "sync/internal_api/public/write_transaction.h" | 42 #include "sync/internal_api/public/write_transaction.h" |
| (...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 int64 root_version = initial_versions[model_->root_node()->id()]; | 2132 int64 root_version = initial_versions[model_->root_node()->id()]; |
| 2133 model_->SetNodeSyncTransactionVersion(model_->root_node(), root_version + 1); | 2133 model_->SetNodeSyncTransactionVersion(model_->root_node(), root_version + 1); |
| 2134 | 2134 |
| 2135 // Upon association, bookmarks should fail to associate. | 2135 // Upon association, bookmarks should fail to associate. |
| 2136 EXPECT_FALSE(AssociateModels()); | 2136 EXPECT_FALSE(AssociateModels()); |
| 2137 } | 2137 } |
| 2138 | 2138 |
| 2139 } // namespace | 2139 } // namespace |
| 2140 | 2140 |
| 2141 } // namespace browser_sync | 2141 } // namespace browser_sync |
| OLD | NEW |