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/test/mock_entropy_provider.h" | 24 #include "base/test/mock_entropy_provider.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 26 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
27 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | |
28 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | |
29 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 27 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
30 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 28 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
31 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/test/base/testing_profile.h" | 30 #include "chrome/test/base/testing_profile.h" |
33 #include "components/bookmarks/browser/base_bookmark_model_observer.h" | 31 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
34 #include "components/bookmarks/browser/bookmark_model.h" | 32 #include "components/bookmarks/browser/bookmark_model.h" |
35 #include "components/bookmarks/test/bookmark_test_helpers.h" | 33 #include "components/bookmarks/test/bookmark_test_helpers.h" |
36 #include "components/sync_driver/data_type_error_handler.h" | 34 #include "components/sync_driver/data_type_error_handler.h" |
37 #include "components/sync_driver/data_type_error_handler_mock.h" | 35 #include "components/sync_driver/data_type_error_handler_mock.h" |
38 #include "content/public/test/test_browser_thread_bundle.h" | 36 #include "content/public/test/test_browser_thread_bundle.h" |
(...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2574 ExpectModelMatch(); | 2572 ExpectModelMatch(); |
2575 | 2573 |
2576 // Then simulate the add call arriving late. | 2574 // Then simulate the add call arriving late. |
2577 change_processor_->BookmarkNodeAdded(model_, model_->bookmark_bar_node(), 0); | 2575 change_processor_->BookmarkNodeAdded(model_, model_->bookmark_bar_node(), 0); |
2578 ExpectModelMatch(); | 2576 ExpectModelMatch(); |
2579 } | 2577 } |
2580 | 2578 |
2581 } // namespace | 2579 } // namespace |
2582 | 2580 |
2583 } // namespace browser_sync | 2581 } // namespace browser_sync |
OLD | NEW |