OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 class LoginScreenDefaultPolicyLoginScreenBrowsertest | 99 class LoginScreenDefaultPolicyLoginScreenBrowsertest |
100 : public LoginScreenDefaultPolicyBrowsertestBase { | 100 : public LoginScreenDefaultPolicyBrowsertestBase { |
101 protected: | 101 protected: |
102 LoginScreenDefaultPolicyLoginScreenBrowsertest(); | 102 LoginScreenDefaultPolicyLoginScreenBrowsertest(); |
103 virtual ~LoginScreenDefaultPolicyLoginScreenBrowsertest(); | 103 virtual ~LoginScreenDefaultPolicyLoginScreenBrowsertest(); |
104 | 104 |
105 // LoginScreenDefaultPolicyBrowsertestBase: | 105 // LoginScreenDefaultPolicyBrowsertestBase: |
106 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 106 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
107 virtual void SetUpOnMainThread() OVERRIDE; | 107 virtual void SetUpOnMainThread() OVERRIDE; |
108 virtual void CleanUpOnMainThread() OVERRIDE; | 108 virtual void TearDownOnMainThread() OVERRIDE; |
109 | 109 |
110 void VerifyPrefFollowsRecommendation(const char* pref_name, | 110 void VerifyPrefFollowsRecommendation(const char* pref_name, |
111 const base::Value& recommended_value); | 111 const base::Value& recommended_value); |
112 | 112 |
113 private: | 113 private: |
114 DISALLOW_COPY_AND_ASSIGN(LoginScreenDefaultPolicyLoginScreenBrowsertest); | 114 DISALLOW_COPY_AND_ASSIGN(LoginScreenDefaultPolicyLoginScreenBrowsertest); |
115 }; | 115 }; |
116 | 116 |
117 class LoginScreenDefaultPolicyInSessionBrowsertest | 117 class LoginScreenDefaultPolicyInSessionBrowsertest |
118 : public LoginScreenDefaultPolicyBrowsertestBase { | 118 : public LoginScreenDefaultPolicyBrowsertestBase { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 accessibility_manager->SetProfileForTest( | 182 accessibility_manager->SetProfileForTest( |
183 chromeos::ProfileHelper::GetSigninProfile()); | 183 chromeos::ProfileHelper::GetSigninProfile()); |
184 | 184 |
185 chromeos::MagnificationManager* magnification_manager = | 185 chromeos::MagnificationManager* magnification_manager = |
186 chromeos::MagnificationManager::Get(); | 186 chromeos::MagnificationManager::Get(); |
187 ASSERT_TRUE(magnification_manager); | 187 ASSERT_TRUE(magnification_manager); |
188 magnification_manager->SetProfileForTest( | 188 magnification_manager->SetProfileForTest( |
189 chromeos::ProfileHelper::GetSigninProfile()); | 189 chromeos::ProfileHelper::GetSigninProfile()); |
190 } | 190 } |
191 | 191 |
192 void LoginScreenDefaultPolicyLoginScreenBrowsertest::CleanUpOnMainThread() { | 192 void LoginScreenDefaultPolicyLoginScreenBrowsertest::TearDownOnMainThread() { |
193 base::MessageLoop::current()->PostTask(FROM_HERE, | 193 base::MessageLoop::current()->PostTask(FROM_HERE, |
194 base::Bind(&chrome::AttemptExit)); | 194 base::Bind(&chrome::AttemptExit)); |
195 base::RunLoop().RunUntilIdle(); | 195 base::RunLoop().RunUntilIdle(); |
196 LoginScreenDefaultPolicyBrowsertestBase::CleanUpOnMainThread(); | 196 LoginScreenDefaultPolicyBrowsertestBase::TearDownOnMainThread(); |
197 } | 197 } |
198 | 198 |
199 void LoginScreenDefaultPolicyLoginScreenBrowsertest:: | 199 void LoginScreenDefaultPolicyLoginScreenBrowsertest:: |
200 VerifyPrefFollowsRecommendation(const char* pref_name, | 200 VerifyPrefFollowsRecommendation(const char* pref_name, |
201 const base::Value& recommended_value) { | 201 const base::Value& recommended_value) { |
202 const PrefService::Preference* pref = | 202 const PrefService::Preference* pref = |
203 login_profile_->GetPrefs()->FindPreference(pref_name); | 203 login_profile_->GetPrefs()->FindPreference(pref_name); |
204 ASSERT_TRUE(pref); | 204 ASSERT_TRUE(pref); |
205 EXPECT_FALSE(pref->IsManaged()); | 205 EXPECT_FALSE(pref->IsManaged()); |
206 EXPECT_FALSE(pref->IsDefaultValue()); | 206 EXPECT_FALSE(pref->IsDefaultValue()); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 base::FundamentalValue(true)); | 457 base::FundamentalValue(true)); |
458 | 458 |
459 // Verify that the on-screen keyboard is enabled. | 459 // Verify that the on-screen keyboard is enabled. |
460 chromeos::AccessibilityManager* accessibility_manager = | 460 chromeos::AccessibilityManager* accessibility_manager = |
461 chromeos::AccessibilityManager::Get(); | 461 chromeos::AccessibilityManager::Get(); |
462 ASSERT_TRUE(accessibility_manager); | 462 ASSERT_TRUE(accessibility_manager); |
463 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled()); | 463 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled()); |
464 } | 464 } |
465 | 465 |
466 } // namespace policy | 466 } // namespace policy |
OLD | NEW |