| 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_
update.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
update.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" | 10 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" |
| 11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
| 12 #include "components/sync/api/sync_change.h" |
| 12 #include "content/public/test/test_browser_thread_bundle.h" | 13 #include "content/public/test/test_browser_thread_bundle.h" |
| 13 #include "sync/api/sync_change.h" | |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 class SupervisedUserSharedSettingsUpdateTest : public testing::Test { | 16 class SupervisedUserSharedSettingsUpdateTest : public testing::Test { |
| 17 public: | 17 public: |
| 18 SupervisedUserSharedSettingsUpdateTest() : service_(profile_.GetPrefs()) {} | 18 SupervisedUserSharedSettingsUpdateTest() : service_(profile_.GetPrefs()) {} |
| 19 ~SupervisedUserSharedSettingsUpdateTest() override {} | 19 ~SupervisedUserSharedSettingsUpdateTest() override {} |
| 20 | 20 |
| 21 void OnSettingUpdated(bool success) { | 21 void OnSettingUpdated(bool success) { |
| 22 result_.reset(new bool(success)); | 22 result_.reset(new bool(success)); |
| 23 } | 23 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 { | 74 { |
| 75 SupervisedUserSharedSettingsUpdate update( | 75 SupervisedUserSharedSettingsUpdate update( |
| 76 &service_, "abcdef", "name", | 76 &service_, "abcdef", "name", |
| 77 std::unique_ptr<base::Value>(new base::StringValue("Hans Moleman")), | 77 std::unique_ptr<base::Value>(new base::StringValue("Hans Moleman")), |
| 78 base::Bind(&SupervisedUserSharedSettingsUpdateTest::OnSettingUpdated, | 78 base::Bind(&SupervisedUserSharedSettingsUpdateTest::OnSettingUpdated, |
| 79 base::Unretained(this))); | 79 base::Unretained(this))); |
| 80 ASSERT_FALSE(result_); | 80 ASSERT_FALSE(result_); |
| 81 } | 81 } |
| 82 ASSERT_FALSE(result_); | 82 ASSERT_FALSE(result_); |
| 83 } | 83 } |
| OLD | NEW |