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 #include <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/sync/api/sync_data.h" | 22 #include "chrome/browser/sync/api/sync_data.h" |
23 #include "chrome/browser/sync/glue/generic_change_processor.h" | 23 #include "chrome/browser/sync/glue/generic_change_processor.h" |
24 #include "chrome/browser/sync/glue/sync_backend_host.h" | 24 #include "chrome/browser/sync/glue/sync_backend_host.h" |
25 #include "chrome/browser/sync/glue/ui_data_type_controller.h" | 25 #include "chrome/browser/sync/glue/ui_data_type_controller.h" |
26 #include "chrome/browser/sync/internal_api/change_record.h" | 26 #include "chrome/browser/sync/internal_api/change_record.h" |
27 #include "chrome/browser/sync/internal_api/read_node.h" | 27 #include "chrome/browser/sync/internal_api/read_node.h" |
28 #include "chrome/browser/sync/internal_api/read_transaction.h" | 28 #include "chrome/browser/sync/internal_api/read_transaction.h" |
29 #include "chrome/browser/sync/internal_api/write_node.h" | 29 #include "chrome/browser/sync/internal_api/write_node.h" |
30 #include "chrome/browser/sync/internal_api/write_transaction.h" | 30 #include "chrome/browser/sync/internal_api/write_transaction.h" |
31 #include "chrome/browser/sync/profile_sync_test_util.h" | 31 #include "chrome/browser/sync/profile_sync_test_util.h" |
32 #include "chrome/browser/sync/syncable/model_type.h" | |
33 #include "chrome/browser/sync/test_profile_sync_service.h" | 32 #include "chrome/browser/sync/test_profile_sync_service.h" |
34 #include "chrome/common/net/gaia/gaia_constants.h" | 33 #include "chrome/common/net/gaia/gaia_constants.h" |
35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
36 #include "chrome/test/base/testing_pref_service.h" | 35 #include "chrome/test/base/testing_pref_service.h" |
37 #include "chrome/test/base/testing_profile.h" | 36 #include "chrome/test/base/testing_profile.h" |
38 #include "sync/protocol/preference_specifics.pb.h" | 37 #include "sync/protocol/preference_specifics.pb.h" |
| 38 #include "sync/syncable/model_type.h" |
39 #include "testing/gmock/include/gmock/gmock.h" | 39 #include "testing/gmock/include/gmock/gmock.h" |
40 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
41 | 41 |
42 using base::JSONReader; | 42 using base::JSONReader; |
43 using browser_sync::GenericChangeProcessor; | 43 using browser_sync::GenericChangeProcessor; |
44 using browser_sync::UIDataTypeController; | 44 using browser_sync::UIDataTypeController; |
45 using browser_sync::SyncBackendHost; | 45 using browser_sync::SyncBackendHost; |
46 using sync_api::ChangeRecord; | 46 using sync_api::ChangeRecord; |
47 using testing::_; | 47 using testing::_; |
48 using testing::Invoke; | 48 using testing::Invoke; |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 EXPECT_FALSE(pref->IsDefaultValue()); | 568 EXPECT_FALSE(pref->IsDefaultValue()); |
569 // There should be no synced value. | 569 // There should be no synced value. |
570 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); | 570 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); |
571 // Switch kHomePage back to unmanaged. | 571 // Switch kHomePage back to unmanaged. |
572 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); | 572 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); |
573 // The original value should be picked up. | 573 // The original value should be picked up. |
574 EXPECT_TRUE(pref->IsDefaultValue()); | 574 EXPECT_TRUE(pref->IsDefaultValue()); |
575 // There should still be no synced value. | 575 // There should still be no synced value. |
576 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); | 576 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); |
577 } | 577 } |
OLD | NEW |