Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: chrome/browser/prefs/prefs_syncable_service_unittest.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/json/json_string_value_serializer.h" 6 #include "base/json/json_string_value_serializer.h"
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/prefs/pref_model_associator.h" 11 #include "chrome/browser/prefs/pref_model_associator.h"
12 #include "chrome/browser/prefs/pref_service_syncable.h" 12 #include "chrome/browser/prefs/pref_service_syncable.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/testing_pref_service_syncable.h" 14 #include "chrome/test/base/testing_pref_service_syncable.h"
15 #include "components/user_prefs/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "grit/locale_settings.h" 16 #include "grit/locale_settings.h"
17 #include "sync/api/attachments/attachment_id.h" 17 #include "sync/api/attachments/attachment_id.h"
18 #include "sync/api/attachments/attachment_service_proxy_for_test.h" 18 #include "sync/api/attachments/attachment_service_proxy_for_test.h"
19 #include "sync/api/sync_change.h" 19 #include "sync/api/sync_change.h"
20 #include "sync/api/sync_data.h" 20 #include "sync/api/sync_data.h"
21 #include "sync/api/sync_error_factory_mock.h" 21 #include "sync/api/sync_error_factory_mock.h"
22 #include "sync/api/syncable_service.h" 22 #include "sync/api/syncable_service.h"
23 #include "sync/protocol/preference_specifics.pb.h" 23 #include "sync/protocol/preference_specifics.pb.h"
24 #include "sync/protocol/sync.pb.h" 24 #include "sync/protocol/sync.pb.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 EXPECT_FALSE(pref->IsDefaultValue()); 699 EXPECT_FALSE(pref->IsDefaultValue());
700 // There should be no synced value. 700 // There should be no synced value.
701 EXPECT_FALSE(FindValue(prefs::kHomePage, out).get()); 701 EXPECT_FALSE(FindValue(prefs::kHomePage, out).get());
702 // Switch kHomePage back to unmanaged. 702 // Switch kHomePage back to unmanaged.
703 GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 703 GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
704 // The original value should be picked up. 704 // The original value should be picked up.
705 EXPECT_TRUE(pref->IsDefaultValue()); 705 EXPECT_TRUE(pref->IsDefaultValue());
706 // There should still be no synced value. 706 // There should still be no synced value.
707 EXPECT_FALSE(FindValue(prefs::kHomePage, out).get()); 707 EXPECT_FALSE(FindValue(prefs::kHomePage, out).get());
708 } 708 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service_syncable_factory.cc ('k') | chrome/browser/prefs/profile_pref_store_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698