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

Side by Side Diff: chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_service_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 <string> 5 #include <string>
6 6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice.h" 7 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice.h"
9 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice_factory.h" 8 #include "chrome/browser/supervised_user/legacy/supervised_user_pref_mapping_ser vice_factory.h"
10 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h" 9 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h"
11 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h" 10 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h"
12 #include "chrome/browser/supervised_user/supervised_user_constants.h" 11 #include "chrome/browser/supervised_user/supervised_user_constants.h"
13 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "components/prefs/pref_service.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 15 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 const char kFakeSupervisedUserId[] = "fakeID"; 18 const char kFakeSupervisedUserId[] = "fakeID";
19 19
20 class SupervisedUserPrefMappingServiceTest : public ::testing::Test { 20 class SupervisedUserPrefMappingServiceTest : public ::testing::Test {
21 protected: 21 protected:
22 SupervisedUserPrefMappingServiceTest() { 22 SupervisedUserPrefMappingServiceTest() {
23 profile_.GetPrefs()->SetString(prefs::kSupervisedUserId, 23 profile_.GetPrefs()->SetString(prefs::kSupervisedUserId,
24 kFakeSupervisedUserId); 24 kFakeSupervisedUserId);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 TEST_F(SupervisedUserPrefMappingServiceTest, CheckSharedSettingUpdate) { 60 TEST_F(SupervisedUserPrefMappingServiceTest, CheckSharedSettingUpdate) {
61 EXPECT_EQ(profile_.GetPrefs()->GetInteger(prefs::kProfileAvatarIndex), -1); 61 EXPECT_EQ(profile_.GetPrefs()->GetInteger(prefs::kProfileAvatarIndex), -1);
62 shared_settings_service_->SetValue(kFakeSupervisedUserId, 62 shared_settings_service_->SetValue(kFakeSupervisedUserId,
63 supervised_users::kChromeAvatarIndex, 63 supervised_users::kChromeAvatarIndex,
64 base::FundamentalValue(1)); 64 base::FundamentalValue(1));
65 mapping_service_->OnSharedSettingChanged( 65 mapping_service_->OnSharedSettingChanged(
66 kFakeSupervisedUserId, 66 kFakeSupervisedUserId,
67 supervised_users::kChromeAvatarIndex); 67 supervised_users::kChromeAvatarIndex);
68 EXPECT_EQ(profile_.GetPrefs()->GetInteger(prefs::kProfileAvatarIndex), 1); 68 EXPECT_EQ(profile_.GetPrefs()->GetInteger(prefs::kProfileAvatarIndex), 1);
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698