| 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 10 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 11 #include "chrome/browser/chromeos/login/startup_utils.h" | 11 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 12 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 12 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| 13 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 13 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 14 #include "chrome/browser/chromeos/settings/cros_settings.h" | 14 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 15 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 15 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
| 16 #include "chrome/browser/signin/signin_manager_factory.h" | 16 #include "chrome/browser/signin/signin_manager_factory.h" |
| 17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/browser_commands.h" | 18 #include "chrome/browser/ui/browser_commands.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
| 22 #include "chromeos/settings/cros_settings_names.h" | 22 #include "chromeos/settings/cros_settings_names.h" |
| 23 #if defined(GOOGLE_CHROME_BUILD) |
| 24 #include "components/spellcheck/browser/pref_names.h" |
| 25 #endif |
| 23 #include "components/prefs/pref_service.h" | 26 #include "components/prefs/pref_service.h" |
| 24 #include "components/signin/core/browser/signin_manager.h" | 27 #include "components/signin/core/browser/signin_manager.h" |
| 25 #include "components/user_manager/user_manager.h" | 28 #include "components/user_manager/user_manager.h" |
| 26 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 27 #include "content/public/test/browser_test_utils.h" | 30 #include "content/public/test/browser_test_utils.h" |
| 28 #include "content/public/test/test_utils.h" | 31 #include "content/public/test/test_utils.h" |
| 29 | 32 |
| 30 namespace chromeos { | 33 namespace chromeos { |
| 31 | 34 |
| 32 namespace { | 35 namespace { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const PrefTest kPrefTests[] = { | 75 const PrefTest kPrefTests[] = { |
| 73 { kSystemTimezone, false, false }, | 76 { kSystemTimezone, false, false }, |
| 74 { prefs::kUse24HourClock, false, false }, | 77 { prefs::kUse24HourClock, false, false }, |
| 75 { kAttestationForContentProtectionEnabled, true, true }, | 78 { kAttestationForContentProtectionEnabled, true, true }, |
| 76 { kAccountsPrefAllowGuest, true, false }, | 79 { kAccountsPrefAllowGuest, true, false }, |
| 77 { kAccountsPrefAllowNewUser, true, false }, | 80 { kAccountsPrefAllowNewUser, true, false }, |
| 78 { kAccountsPrefShowUserNamesOnSignIn, true, false }, | 81 { kAccountsPrefShowUserNamesOnSignIn, true, false }, |
| 79 { kAccountsPrefSupervisedUsersEnabled, true, false }, | 82 { kAccountsPrefSupervisedUsersEnabled, true, false }, |
| 80 #if defined(GOOGLE_CHROME_BUILD) | 83 #if defined(GOOGLE_CHROME_BUILD) |
| 81 { kStatsReportingPref, true, true }, | 84 { kStatsReportingPref, true, true }, |
| 82 { prefs::kSpellCheckUseSpellingService, false, false }, | 85 { spellcheck::prefs::kSpellCheckUseSpellingService, false, false }, |
| 83 #endif | 86 #endif |
| 84 }; | 87 }; |
| 85 | 88 |
| 86 } // namespace | 89 } // namespace |
| 87 | 90 |
| 88 class SharedOptionsTest : public LoginManagerTest { | 91 class SharedOptionsTest : public LoginManagerTest { |
| 89 public: | 92 public: |
| 90 SharedOptionsTest() | 93 SharedOptionsTest() |
| 91 : LoginManagerTest(false), | 94 : LoginManagerTest(false), |
| 92 device_settings_provider_(NULL), | 95 device_settings_provider_(NULL), |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 content::WaitForLoadStop(contents); | 444 content::WaitForLoadStop(contents); |
| 442 { | 445 { |
| 443 SCOPED_TRACE("Screen lock false for both users"); | 446 SCOPED_TRACE("Screen lock false for both users"); |
| 444 expected_value = false; | 447 expected_value = false; |
| 445 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, | 448 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, |
| 446 empty_controlled, expected_value); | 449 empty_controlled, expected_value); |
| 447 } | 450 } |
| 448 } | 451 } |
| 449 | 452 |
| 450 } // namespace chromeos | 453 } // namespace chromeos |
| OLD | NEW |