| 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
| 7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "chrome/browser/sync/chrome_sync_client.h" | 8 #include "chrome/browser/sync/chrome_sync_client.h" |
| 9 #include "chrome/browser/sync/profile_sync_service_factory.h" | 9 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 11 #include "chrome/browser/sync/test/integration/status_change_checker.h" | 11 #include "chrome/browser/sync/test/integration/status_change_checker.h" |
| 12 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 12 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
| 13 #include "chrome/browser/sync/test/integration/sync_test.h" | 13 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 14 #include "components/browser_sync/browser/profile_sync_components_factory_impl.h
" | 14 #include "components/browser_sync/profile_sync_components_factory_impl.h" |
| 15 #include "components/sync/api/fake_model_type_service.h" | 15 #include "components/sync/api/fake_model_type_service.h" |
| 16 | 16 |
| 17 using browser_sync::ChromeSyncClient; | 17 using browser_sync::ChromeSyncClient; |
| 18 using syncer_v2::FakeModelTypeService; | 18 using syncer_v2::FakeModelTypeService; |
| 19 using syncer_v2::ModelTypeService; | 19 using syncer_v2::ModelTypeService; |
| 20 using syncer_v2::SharedModelTypeProcessor; | 20 using syncer_v2::SharedModelTypeProcessor; |
| 21 | 21 |
| 22 // A ChromeSyncClient that provides a ModelTypeService for PREFERENCES. | 22 // A ChromeSyncClient that provides a ModelTypeService for PREFERENCES. |
| 23 class TestSyncClient : public ChromeSyncClient { | 23 class TestSyncClient : public ChromeSyncClient { |
| 24 public: | 24 public: |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 TestModelTypeService* model1 = GetModelTypeService(0); | 186 TestModelTypeService* model1 = GetModelTypeService(0); |
| 187 TestModelTypeService* model2 = GetModelTypeService(1); | 187 TestModelTypeService* model2 = GetModelTypeService(1); |
| 188 | 188 |
| 189 model1->WriteItem("foo", "bar"); | 189 model1->WriteItem("foo", "bar"); |
| 190 ASSERT_TRUE(KeyPresentChecker(model2, "foo").Wait()); | 190 ASSERT_TRUE(KeyPresentChecker(model2, "foo").Wait()); |
| 191 EXPECT_EQ("bar", model2->db().GetValue("foo")); | 191 EXPECT_EQ("bar", model2->db().GetValue("foo")); |
| 192 | 192 |
| 193 model1->DeleteItem("foo"); | 193 model1->DeleteItem("foo"); |
| 194 ASSERT_TRUE(KeyAbsentChecker(model2, "foo").Wait()); | 194 ASSERT_TRUE(KeyAbsentChecker(model2, "foo").Wait()); |
| 195 } | 195 } |
| OLD | NEW |