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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 // Verify that the screen magnifier is disabled. | 428 // Verify that the screen magnifier is disabled. |
429 chromeos::MagnificationManager* magnification_manager = | 429 chromeos::MagnificationManager* magnification_manager = |
430 chromeos::MagnificationManager::Get(); | 430 chromeos::MagnificationManager::Get(); |
431 ASSERT_TRUE(magnification_manager); | 431 ASSERT_TRUE(magnification_manager); |
432 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled()); | 432 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled()); |
433 EXPECT_EQ(ash::kDefaultMagnifierType, | 433 EXPECT_EQ(ash::kDefaultMagnifierType, |
434 magnification_manager->GetMagnifierType()); | 434 magnification_manager->GetMagnifierType()); |
435 } | 435 } |
436 | 436 |
| 437 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest, |
| 438 DeviceLoginScreenDefaultVirtualKeyboardEnabled) { |
| 439 // Verifies that the default state of the on-screen keyboard accessibility |
| 440 // feature on the login screen can be controlled through device policy. |
| 441 |
| 442 // Enable the on-screen keyboard through device policy and wait for the change |
| 443 // to take effect. |
| 444 em::ChromeDeviceSettingsProto& proto(device_policy()->payload()); |
| 445 proto.mutable_accessibility_settings()-> |
| 446 set_login_screen_default_virtual_keyboard_enabled(true); |
| 447 RefreshDevicePolicyAndWaitForPrefChange(prefs::kVirtualKeyboardEnabled); |
| 448 |
| 449 // Verify that the pref which controls the on-screen keyboard in the login |
| 450 // profile has changed to the policy-supplied default. |
| 451 VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled, |
| 452 base::FundamentalValue(true)); |
| 453 |
| 454 // Verify that the on-screen keyboard is enabled. |
| 455 chromeos::AccessibilityManager* accessibility_manager = |
| 456 chromeos::AccessibilityManager::Get(); |
| 457 ASSERT_TRUE(accessibility_manager); |
| 458 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled()); |
| 459 } |
| 460 |
437 } // namespace policy | 461 } // namespace policy |
OLD | NEW |