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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 ExpectModelMatch(); | 2164 ExpectModelMatch(); |
2165 | 2165 |
2166 // Then simulate the add call arriving late. | 2166 // Then simulate the add call arriving late. |
2167 change_processor_->BookmarkNodeAdded(model_, model_->bookmark_bar_node(), 0); | 2167 change_processor_->BookmarkNodeAdded(model_, model_->bookmark_bar_node(), 0); |
2168 ExpectModelMatch(); | 2168 ExpectModelMatch(); |
2169 } | 2169 } |
2170 | 2170 |
2171 } // namespace | 2171 } // namespace |
2172 | 2172 |
2173 } // namespace browser_sync | 2173 } // namespace browser_sync |
OLD | NEW |