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

Side by Side Diff: chrome/browser/sync/profile_sync_service_preference_unittest.cc

Issue 60733019: This is the third CL of several that will eventually replace TokenService with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 1 month 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 (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"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/json/json_string_value_serializer.h" 12 #include "base/json/json_string_value_serializer.h"
13 #include "base/json/json_writer.h" 13 #include "base/json/json_writer.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/prefs/scoped_user_pref_update.h" 15 #include "base/prefs/scoped_user_pref_update.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "base/strings/string_piece.h" 17 #include "base/strings/string_piece.h"
18 #include "chrome/browser/invalidation/invalidation_service_factory.h" 18 #include "chrome/browser/invalidation/invalidation_service_factory.h"
19 #include "chrome/browser/prefs/pref_model_associator.h" 19 #include "chrome/browser/prefs/pref_model_associator.h"
20 #include "chrome/browser/signin/signin_manager.h" 20 #include "chrome/browser/signin/signin_manager.h"
21 #include "chrome/browser/signin/signin_manager_factory.h" 21 #include "chrome/browser/signin/signin_manager_factory.h"
22 #include "chrome/browser/signin/token_service_factory.h"
23 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 22 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
24 #include "chrome/browser/sync/fake_oauth2_token_service.h" 23 #include "chrome/browser/sync/fake_oauth2_token_service.h"
25 #include "chrome/browser/sync/glue/generic_change_processor.h" 24 #include "chrome/browser/sync/glue/generic_change_processor.h"
26 #include "chrome/browser/sync/glue/sync_backend_host.h" 25 #include "chrome/browser/sync/glue/sync_backend_host.h"
27 #include "chrome/browser/sync/glue/ui_data_type_controller.h" 26 #include "chrome/browser/sync/glue/ui_data_type_controller.h"
28 #include "chrome/browser/sync/profile_sync_service_factory.h" 27 #include "chrome/browser/sync/profile_sync_service_factory.h"
29 #include "chrome/browser/sync/profile_sync_test_util.h" 28 #include "chrome/browser/sync/profile_sync_test_util.h"
30 #include "chrome/browser/sync/test_profile_sync_service.h" 29 #include "chrome/browser/sync/test_profile_sync_service.h"
31 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
32 #include "chrome/test/base/testing_pref_service_syncable.h" 31 #include "chrome/test/base/testing_pref_service_syncable.h"
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 EXPECT_FALSE(pref->IsDefaultValue()); 888 EXPECT_FALSE(pref->IsDefaultValue());
890 // There should be no synced value. 889 // There should be no synced value.
891 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 890 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
892 // Switch kHomePage back to unmanaged. 891 // Switch kHomePage back to unmanaged.
893 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 892 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
894 // The original value should be picked up. 893 // The original value should be picked up.
895 EXPECT_TRUE(pref->IsDefaultValue()); 894 EXPECT_TRUE(pref->IsDefaultValue());
896 // There should still be no synced value. 895 // There should still be no synced value.
897 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 896 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
898 } 897 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698