| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.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/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void GetSupervisedUsersCallback(const base::DictionaryValue** dict, | 77 void GetSupervisedUsersCallback(const base::DictionaryValue** dict, |
| 78 const base::DictionaryValue* supervised_users) { | 78 const base::DictionaryValue* supervised_users) { |
| 79 *dict = supervised_users; | 79 *dict = supervised_users; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 | 83 |
| 84 class SupervisedUserSyncServiceTest : public ::testing::Test { | 84 class SupervisedUserSyncServiceTest : public ::testing::Test { |
| 85 public: | 85 public: |
| 86 SupervisedUserSyncServiceTest(); | 86 SupervisedUserSyncServiceTest(); |
| 87 virtual ~SupervisedUserSyncServiceTest(); | 87 ~SupervisedUserSyncServiceTest() override; |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 scoped_ptr<SyncChangeProcessor> CreateChangeProcessor(); | 90 scoped_ptr<SyncChangeProcessor> CreateChangeProcessor(); |
| 91 scoped_ptr<SyncErrorFactory> CreateErrorFactory(); | 91 scoped_ptr<SyncErrorFactory> CreateErrorFactory(); |
| 92 SyncData CreateRemoteData(const std::string& id, | 92 SyncData CreateRemoteData(const std::string& id, |
| 93 const std::string& name, | 93 const std::string& name, |
| 94 const std::string& avatar); | 94 const std::string& avatar); |
| 95 | 95 |
| 96 PrefService* prefs() { return profile_.GetPrefs(); } | 96 PrefService* prefs() { return profile_.GetPrefs(); } |
| 97 SupervisedUserSyncService* service() { return service_; } | 97 SupervisedUserSyncService* service() { return service_; } |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( | 359 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( |
| 360 "chrome-avatar-index:x", | 360 "chrome-avatar-index:x", |
| 361 &avatar)); | 361 &avatar)); |
| 362 | 362 |
| 363 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( | 363 EXPECT_FALSE(SupervisedUserSyncService::GetAvatarIndex( |
| 364 "chromeos-avatar-index:5", | 364 "chromeos-avatar-index:5", |
| 365 &avatar)); | 365 &avatar)); |
| 366 #endif | 366 #endif |
| 367 } | 367 } |
| OLD | NEW |