recommended_prefs_->SetBoolean(prefs::kHighContrastEnabled, false);
recommended_prefs_->SetBoolean(prefs::kScreenMagnifierEnabled, false);
recommended_prefs_->SetInteger(prefs::kScreenMagnifierType, 0);
+ recommended_prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, false);
}
void RecommendationRestorerTest::SetUserSettings() {
prefs_->SetBoolean(prefs::kHighContrastEnabled, true);
prefs_->SetBoolean(prefs::kScreenMagnifierEnabled, true);
prefs_->SetInteger(prefs::kScreenMagnifierType, ash::MAGNIFIER_FULL);
+ prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, true);
}
void RecommendationRestorerTest::CreateLoginProfile() {
base::FundamentalValue(true));
VerifyPrefFollowsUser(prefs::kScreenMagnifierType,
base::FundamentalValue(ash::MAGNIFIER_FULL));
+ VerifyPrefFollowsUser(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
}
void RecommendationRestorerTest::VerifyPrefFollowsRecommendation(
base::FundamentalValue(false));
VerifyPrefFollowsRecommendation(prefs::kScreenMagnifierType,
base::FundamentalValue(0));
+ VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(false));
}
void RecommendationRestorerTest::VerifyNotListeningForNotifications() const {
base::FundamentalValue(false));
VerifyPrefFollowsRecommendation(prefs::kScreenMagnifierType,
base::FundamentalValue(0));
-
+ VerifyTimerIsStopped();
+ recommended_prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, false);
+ VerifyPrefFollowsUser(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
+ VerifyTimerIsRunning();
+ runner_->RunUntilIdle();
+ VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(false));
VerifyTimerIsStopped();
}
base::FundamentalValue(false));
VerifyPrefFollowsRecommendation(prefs::kScreenMagnifierType,
base::FundamentalValue(0));
+
+ VerifyPrefFollowsUser(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
+ recommended_prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, false);
+ VerifyTimerIsStopped();
+ VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(false));
}
TEST_F(RecommendationRestorerTest, DoNothingOnUserChange) {
VerifyPrefFollowsUser(prefs::kScreenMagnifierType,
base::FundamentalValue(ash::MAGNIFIER_FULL));
VerifyTimerIsStopped();
+
+ prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, true);
+ VerifyPrefFollowsUser(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
+ VerifyTimerIsStopped();
}
TEST_F(RecommendationRestorerTest, RestoreOnUserChange) {
base::FundamentalValue(0));
VerifyTimerIsStopped();
+ prefs_->SetBoolean(prefs::kVirtualKeyboardEnabled, true);
+ VerifyPrefFollowsUser(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(true));
+ VerifyTimerIsRunning();
+ runner_->RunUntilIdle();
+ VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
+ base::FundamentalValue(false));
+
+ VerifyTimerIsStopped();
}
TEST_F(RecommendationRestorerTest, RestoreOnSessionStart) {