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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/prefs/pref_service.h" | |
10 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
11 #include "build/build_config.h" | 10 #include "build/build_config.h" |
12 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/profile_info_cache.h" | 13 #include "chrome/browser/profiles/profile_info_cache.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 15 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
17 #include "chrome/browser/supervised_user/supervised_user_service.h" | 16 #include "chrome/browser/supervised_user/supervised_user_service.h" |
18 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 17 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
19 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 18 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
20 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" | 19 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
21 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
22 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
24 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
| 24 #include "components/prefs/pref_service.h" |
25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
26 #include "google_apis/gaia/google_service_auth_error.h" | 26 #include "google_apis/gaia/google_service_auth_error.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 void TestAuthErrorCallback(const GoogleServiceAuthError& error) {} | 30 void TestAuthErrorCallback(const GoogleServiceAuthError& error) {} |
31 | 31 |
32 class SupervisedUserServiceTestSupervised : public InProcessBrowserTest { | 32 class SupervisedUserServiceTestSupervised : public InProcessBrowserTest { |
33 public: | 33 public: |
34 // content::BrowserTestBase: | 34 // content::BrowserTestBase: |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index))); | 146 base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index))); |
147 | 147 |
148 // Remove the setting. | 148 // Remove the setting. |
149 settings->SetLocalSetting(supervised_users::kUserName, | 149 settings->SetLocalSetting(supervised_users::kUserName, |
150 scoped_ptr<base::Value>()); | 150 scoped_ptr<base::Value>()); |
151 EXPECT_EQ(original_name, prefs->GetString(prefs::kProfileName)); | 151 EXPECT_EQ(original_name, prefs->GetString(prefs::kProfileName)); |
152 profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath()); | 152 profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath()); |
153 EXPECT_EQ(original_name, | 153 EXPECT_EQ(original_name, |
154 base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index))); | 154 base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index))); |
155 } | 155 } |
OLD | NEW |