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 <stack> | 9 #include <stack> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
18 #include "base/string16.h" | 18 #include "base/string16.h" |
19 #include "base/string_number_conversions.h" | 19 #include "base/string_number_conversions.h" |
20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
21 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
| 22 #include "chrome/browser/bookmarks/base_bookmark_model_observer.h" |
22 #include "chrome/browser/bookmarks/bookmark_model.h" | 23 #include "chrome/browser/bookmarks/bookmark_model.h" |
23 #include "chrome/browser/bookmarks/base_bookmark_model_observer.h" | |
24 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 24 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
25 #include "chrome/browser/sync/api/sync_error.h" | 25 #include "chrome/browser/sync/api/sync_error.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/browser/sync/glue/data_type_error_handler.h" | 28 #include "chrome/browser/sync/glue/data_type_error_handler.h" |
29 #include "chrome/browser/sync/glue/data_type_error_handler_mock.h" | 29 #include "chrome/browser/sync/glue/data_type_error_handler_mock.h" |
30 #include "chrome/browser/sync/internal_api/change_record.h" | 30 #include "chrome/browser/sync/internal_api/change_record.h" |
31 #include "chrome/browser/sync/internal_api/read_node.h" | 31 #include "chrome/browser/sync/internal_api/read_node.h" |
32 #include "chrome/browser/sync/internal_api/read_transaction.h" | 32 #include "chrome/browser/sync/internal_api/read_transaction.h" |
33 #include "chrome/browser/sync/internal_api/write_node.h" | 33 #include "chrome/browser/sync/internal_api/write_node.h" |
34 #include "chrome/browser/sync/internal_api/write_transaction.h" | 34 #include "chrome/browser/sync/internal_api/write_transaction.h" |
35 #include "chrome/browser/sync/test/engine/test_id_factory.h" | |
36 #include "chrome/browser/sync/test/engine/test_user_share.h" | 35 #include "chrome/browser/sync/test/engine/test_user_share.h" |
37 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
38 #include "chrome/test/base/testing_profile.h" | 37 #include "chrome/test/base/testing_profile.h" |
39 #include "content/test/test_browser_thread.h" | 38 #include "content/test/test_browser_thread.h" |
| 39 #include "sync/test/engine/test_id_factory.h" |
40 #include "testing/gmock/include/gmock/gmock.h" | 40 #include "testing/gmock/include/gmock/gmock.h" |
41 #include "testing/gtest/include/gtest/gtest.h" | 41 #include "testing/gtest/include/gtest/gtest.h" |
42 | 42 |
43 namespace browser_sync { | 43 namespace browser_sync { |
44 | 44 |
45 using testing::_; | 45 using testing::_; |
46 using testing::InvokeWithoutArgs; | 46 using testing::InvokeWithoutArgs; |
47 using testing::Mock; | 47 using testing::Mock; |
48 using testing::StrictMock; | 48 using testing::StrictMock; |
49 using content::BrowserThread; | 49 using content::BrowserThread; |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 EXPECT_EQ(1, observer.get_started()); | 1486 EXPECT_EQ(1, observer.get_started()); |
1487 EXPECT_EQ(0, observer.get_completed_count_at_started()); | 1487 EXPECT_EQ(0, observer.get_completed_count_at_started()); |
1488 EXPECT_EQ(1, observer.get_completed()); | 1488 EXPECT_EQ(1, observer.get_completed()); |
1489 | 1489 |
1490 model_->RemoveObserver(&observer); | 1490 model_->RemoveObserver(&observer); |
1491 } | 1491 } |
1492 | 1492 |
1493 } // namespace | 1493 } // namespace |
1494 | 1494 |
1495 } // namespace browser_sync | 1495 } // namespace browser_sync |
OLD | NEW |