| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/sys_info.h" | 5 #include "base/sys_info.h" | 
| 6 #include "base/values.h" | 6 #include "base/values.h" | 
| 7 #include "chrome/browser/chromeos/arc/arc_util.h" | 7 #include "chrome/browser/chromeos/arc/arc_util.h" | 
| 8 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 8 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 
| 9 #include "chrome/browser/chromeos/settings/cros_settings.h" | 9 #include "chrome/browser/chromeos/settings/cros_settings.h" | 
| 10 #include "chrome/browser/chromeos/settings/stub_install_attributes.h" | 10 #include "chrome/browser/chromeos/settings/stub_install_attributes.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 37   void SetDeviceType(const std::string& device_type) { | 37   void SetDeviceType(const std::string& device_type) { | 
| 38     const std::string lsb_release = std::string("DEVICETYPE=") + device_type; | 38     const std::string lsb_release = std::string("DEVICETYPE=") + device_type; | 
| 39     base::SysInfo::SetChromeOSVersionInfoForTest(lsb_release, | 39     base::SysInfo::SetChromeOSVersionInfoForTest(lsb_release, | 
| 40                                                  base::Time::Now()); | 40                                                  base::Time::Now()); | 
| 41   } | 41   } | 
| 42 }; | 42 }; | 
| 43 | 43 | 
| 44 IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, TestGetAndSet) { | 44 IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, TestGetAndSet) { | 
| 45   // Set the initial timezone different from what JS function | 45   // Set the initial timezone different from what JS function | 
| 46   // timezoneSetTest() will attempt to set. | 46   // timezoneSetTest() will attempt to set. | 
| 47   base::Value initial_timezone("America/Los_Angeles"); | 47   profile()->GetPrefs()->SetString(prefs::kUserTimezone, "America/Los_Angeles"); | 
| 48   chromeos::CrosSettings::Get()->Set(chromeos::kSystemTimezone, |  | 
| 49                                      initial_timezone); |  | 
| 50 | 48 | 
| 51   // Check that accessibility settings are set to default values. | 49   // Check that accessibility settings are set to default values. | 
| 52   PrefService* prefs = profile()->GetPrefs(); | 50   PrefService* prefs = profile()->GetPrefs(); | 
| 53   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled)); | 51   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled)); | 
| 54   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityStickyKeysEnabled)); | 52   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityStickyKeysEnabled)); | 
| 55   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled)); | 53   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled)); | 
| 56   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityHighContrastEnabled)); | 54   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityHighContrastEnabled)); | 
| 57   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled)); | 55   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled)); | 
| 58   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityAutoclickEnabled)); | 56   ASSERT_FALSE(prefs->GetBoolean(prefs::kAccessibilityAutoclickEnabled)); | 
| 59 | 57 | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 174 | 172 | 
| 175  private: | 173  private: | 
| 176   DISALLOW_COPY_AND_ASSIGN(ChromeOSManagedDeviceInfoPrivateTest); | 174   DISALLOW_COPY_AND_ASSIGN(ChromeOSManagedDeviceInfoPrivateTest); | 
| 177 }; | 175 }; | 
| 178 | 176 | 
| 179 IN_PROC_BROWSER_TEST_F(ChromeOSManagedDeviceInfoPrivateTest, Managed) { | 177 IN_PROC_BROWSER_TEST_F(ChromeOSManagedDeviceInfoPrivateTest, Managed) { | 
| 180   ASSERT_TRUE( | 178   ASSERT_TRUE( | 
| 181       RunPlatformAppTestWithArg("chromeos_info_private/extended", "managed")) | 179       RunPlatformAppTestWithArg("chromeos_info_private/extended", "managed")) | 
| 182       << message_; | 180       << message_; | 
| 183 } | 181 } | 
| OLD | NEW | 
|---|