| OLD | NEW |
| 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 "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
| 15 #include "components/prefs/pref_service.h" | 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/sync/api/fake_sync_change_processor.h" |
| 17 #include "components/sync/api/sync_change.h" |
| 18 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" |
| 19 #include "components/sync/api/sync_error_factory_mock.h" |
| 20 #include "components/sync/protocol/sync.pb.h" |
| 16 #include "content/public/test/test_browser_thread_bundle.h" | 21 #include "content/public/test/test_browser_thread_bundle.h" |
| 17 #include "sync/api/fake_sync_change_processor.h" | |
| 18 #include "sync/api/sync_change.h" | |
| 19 #include "sync/api/sync_change_processor_wrapper_for_test.h" | |
| 20 #include "sync/api/sync_error_factory_mock.h" | |
| 21 #include "sync/protocol/sync.pb.h" | |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 23 |
| 24 using base::DictionaryValue; | 24 using base::DictionaryValue; |
| 25 using base::FundamentalValue; | 25 using base::FundamentalValue; |
| 26 using base::StringValue; | 26 using base::StringValue; |
| 27 using base::Value; | 27 using base::Value; |
| 28 using sync_pb::ManagedUserSharedSettingSpecifics; | 28 using sync_pb::ManagedUserSharedSettingSpecifics; |
| 29 using syncer::SUPERVISED_USER_SHARED_SETTINGS; | 29 using syncer::SUPERVISED_USER_SHARED_SETTINGS; |
| 30 using syncer::SyncChange; | 30 using syncer::SyncChange; |
| 31 using syncer::SyncChangeList; | 31 using syncer::SyncChangeList; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 settings_service_.GetAllSyncData(SUPERVISED_USER_SHARED_SETTINGS).size()); | 280 settings_service_.GetAllSyncData(SUPERVISED_USER_SHARED_SETTINGS).size()); |
| 281 EXPECT_EQ(ToJson(&name), | 281 EXPECT_EQ(ToJson(&name), |
| 282 ToJson(settings_service_.GetValue(kIdA, "name"))); | 282 ToJson(settings_service_.GetValue(kIdA, "name"))); |
| 283 EXPECT_EQ(ToJson(&age), ToJson(settings_service_.GetValue(kIdA, "age"))); | 283 EXPECT_EQ(ToJson(&age), ToJson(settings_service_.GetValue(kIdA, "age"))); |
| 284 EXPECT_EQ(ToJson(&bar), ToJson(settings_service_.GetValue(kIdB, "foo"))); | 284 EXPECT_EQ(ToJson(&bar), ToJson(settings_service_.GetValue(kIdB, "foo"))); |
| 285 EXPECT_EQ(ToJson(&blurp), ToJson(settings_service_.GetValue(kIdC, "baz"))); | 285 EXPECT_EQ(ToJson(&blurp), ToJson(settings_service_.GetValue(kIdC, "baz"))); |
| 286 EXPECT_FALSE(settings_service_.GetValue(kIdA, "foo")); | 286 EXPECT_FALSE(settings_service_.GetValue(kIdA, "foo")); |
| 287 EXPECT_FALSE(settings_service_.GetValue(kIdB, "name")); | 287 EXPECT_FALSE(settings_service_.GetValue(kIdB, "name")); |
| 288 EXPECT_FALSE(settings_service_.GetValue(kIdC, "name")); | 288 EXPECT_FALSE(settings_service_.GetValue(kIdC, "name")); |
| 289 } | 289 } |
| OLD | NEW |