+IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest,
+ DeviceLoginScreenDefaultVirtualKeyboardEnabled) {
+ // Verifies that the default state of the on-screen keyboard accessibility
+ // feature on the login screen can be controlled through device policy.
+
+ // Enable the on-screen keyboard through device policy and wait for the change
+ // to take effect.
+ em::ChromeDeviceSettingsProto& proto(device_policy()->payload());
+ proto.mutable_accessibility_settings()->
+ set_login_screen_default_virtual_keyboard_enabled(true);
+ RefreshDevicePolicyAndWaitForPrefChange(prefs::kVirtualKeyboardEnabled);
+
+ // Verify that the pref which controls the on-screen keyboard in the login
+ // profile has changed to the policy-supplied default.
+ VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
+
+ // Verify that the on-screen keyboard is enabled.
+ chromeos::AccessibilityManager* accessibility_manager =
+ chromeos::AccessibilityManager::Get();
+ ASSERT_TRUE(accessibility_manager);
+ EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled());
+}
+