OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "sync/api/fake_model_type_change_processor.h" | 9 #include "components/sync/api/fake_model_type_change_processor.h" |
10 #include "sync/api/fake_model_type_service.h" | 10 #include "components/sync/api/fake_model_type_service.h" |
11 #include "sync/internal_api/public/test/data_type_error_handler_mock.h" | 11 #include "components/sync/core/test/data_type_error_handler_mock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace syncer_v2 { | 14 namespace syncer_v2 { |
15 | 15 |
16 // A mock MTCP that lets us know when DisableSync is called. | 16 // A mock MTCP that lets us know when DisableSync is called. |
17 class MockModelTypeChangeProcessor : public FakeModelTypeChangeProcessor { | 17 class MockModelTypeChangeProcessor : public FakeModelTypeChangeProcessor { |
18 public: | 18 public: |
19 explicit MockModelTypeChangeProcessor(const base::Closure& disabled_callback) | 19 explicit MockModelTypeChangeProcessor(const base::Closure& disabled_callback) |
20 : disabled_callback_(disabled_callback) {} | 20 : disabled_callback_(disabled_callback) {} |
21 ~MockModelTypeChangeProcessor() override {} | 21 ~MockModelTypeChangeProcessor() override {} |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 service()->ResolveConflict(local_data, remote_data).type()); | 147 service()->ResolveConflict(local_data, remote_data).type()); |
148 | 148 |
149 local_data.specifics.clear_preference(); | 149 local_data.specifics.clear_preference(); |
150 EXPECT_TRUE(local_data.is_deleted()); | 150 EXPECT_TRUE(local_data.is_deleted()); |
151 EXPECT_FALSE(remote_data.is_deleted()); | 151 EXPECT_FALSE(remote_data.is_deleted()); |
152 EXPECT_EQ(ConflictResolution::USE_REMOTE, | 152 EXPECT_EQ(ConflictResolution::USE_REMOTE, |
153 service()->ResolveConflict(local_data, remote_data).type()); | 153 service()->ResolveConflict(local_data, remote_data).type()); |
154 } | 154 } |
155 | 155 |
156 } // namespace syncer_v2 | 156 } // namespace syncer_v2 |
OLD | NEW |