0

FaceGaze: Add FaceGaze to quick settings

This change adds a FaceGaze options to the accessibility
quick settings.

Bug: b/314321304
Test: ash_unittests --gtest_filter="*AccessibilityControllerTest*"
AX-Relnotes: N/A

Change-Id: I2578e90cba3913335c2869615306c31296ad0ab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5079758
Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: Akihiro Ota <akihiroota@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Bastian Kersting <bkersting@google.com>
Cr-Commit-Position: refs/heads/main@{#1232956}
This commit is contained in:
Bastian Kersting
2023-12-04 20:52:06 +00:00
committed by Chromium LUCI CQ
parent baf0389449
commit a76f551a28
12 changed files with 363 additions and 4 deletions

@ -31,6 +31,7 @@
#include "ash/keyboard/ui/keyboard_util.h"
#include "ash/login_status.h"
#include "ash/policy/policy_recommendation_restorer.h"
#include "ash/public/cpp/accessibility_controller.h"
#include "ash/public/cpp/accessibility_controller_client.h"
#include "ash/public/cpp/ash_constants.h"
#include "ash/public/cpp/notification_utils.h"
@ -54,6 +55,7 @@
#include "ash/system/power/backlights_forced_off_setter.h"
#include "ash/system/power/power_status.h"
#include "ash/system/power/scoped_backlights_forced_off.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr_exclusion.h"
@ -163,8 +165,9 @@ const FeatureData kFeatures[] = {
{FeatureType::kVirtualKeyboard, prefs::kAccessibilityVirtualKeyboardEnabled,
&kSystemMenuKeyboardLegacyIcon,
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD},
{FeatureType::kFaceGaze, prefs::kAccessibilityFaceGazeEnabled, nullptr, 0,
/*toggleable_in_quicksettings=*/false},
{FeatureType::kFaceGaze, prefs::kAccessibilityFaceGazeEnabled, nullptr,
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_FACEGAZE,
/*toggleable_in_quicksettings=*/true},
};
// An array describing the confirmation dialogs for the features which have
@ -1455,6 +1458,7 @@ bool AccessibilityControllerImpl::IsPrimarySettingsViewVisibleInTray() {
return (IsSpokenFeedbackSettingVisibleInTray() ||
IsSelectToSpeakSettingVisibleInTray() ||
IsDictationSettingVisibleInTray() ||
IsFaceGazeSettingVisibleInTray() ||
IsColorCorrectionSettingVisibleInTray() ||
IsHighContrastSettingVisibleInTray() ||
IsFullScreenMagnifierSettingVisibleInTray() ||
@ -1489,6 +1493,14 @@ bool AccessibilityControllerImpl::IsEnterpriseIconVisibleForDictation() {
return dictation().IsEnterpriseIconVisible();
}
bool AccessibilityControllerImpl::IsFaceGazeSettingVisibleInTray() {
return face_gaze().IsVisibleInTray();
}
bool AccessibilityControllerImpl::IsEnterpriseIconVisibleForFaceGaze() {
return face_gaze().IsEnterpriseIconVisible();
}
bool AccessibilityControllerImpl::IsFocusHighlightSettingVisibleInTray() {
return focus_highlight().IsVisibleInTray();
}

@ -292,6 +292,9 @@ class ASH_EXPORT AccessibilityControllerImpl : public AccessibilityController,
bool IsDictationSettingVisibleInTray();
bool IsEnterpriseIconVisibleForDictation();
bool IsFaceGazeSettingVisibleInTray();
bool IsEnterpriseIconVisibleForFaceGaze();
bool IsFocusHighlightSettingVisibleInTray();
bool IsEnterpriseIconVisibleForFocusHighlight();

@ -309,6 +309,46 @@ TEST_F(AccessibilityControllerTest, SetFaceGazeEnabled) {
controller->RemoveObserver(&observer);
}
TEST_F(AccessibilityControllerTest, FaceGazeTrayMenuVisibility) {
// Check that when the pref isn't being controlled by any policy will be
// visible in the accessibility tray menu despite its value.
PrefService* prefs =
Shell::Get()->session_controller()->GetLastActiveUserPrefService();
AccessibilityControllerImpl* controller =
Shell::Get()->accessibility_controller();
// Check when the value is true and not being controlled by any policy.
controller->face_gaze().SetEnabled(true);
EXPECT_FALSE(
prefs->IsManagedPreference(prefs::kAccessibilityFaceGazeEnabled));
EXPECT_TRUE(prefs->GetBoolean(prefs::kAccessibilityFaceGazeEnabled));
EXPECT_TRUE(controller->face_gaze().enabled());
EXPECT_TRUE(controller->IsFaceGazeSettingVisibleInTray());
// Check when the value is false and not being controlled by any policy.
controller->face_gaze().SetEnabled(false);
EXPECT_FALSE(
prefs->IsManagedPreference(prefs::kAccessibilityFaceGazeEnabled));
EXPECT_FALSE(controller->face_gaze().enabled());
EXPECT_TRUE(controller->IsFaceGazeSettingVisibleInTray());
EXPECT_FALSE(prefs->GetBoolean(prefs::kAccessibilityFaceGazeEnabled));
// Check that when the pref is managed and being forced on then it will be
// visible.
static_cast<TestingPrefServiceSimple*>(prefs)->SetManagedPref(
prefs::kAccessibilityFaceGazeEnabled,
std::make_unique<base::Value>(true));
EXPECT_TRUE(prefs->IsManagedPreference(prefs::kAccessibilityFaceGazeEnabled));
EXPECT_TRUE(controller->IsFaceGazeSettingVisibleInTray());
// Check that when the pref is managed and only being forced off then it will
// be invisible.
static_cast<TestingPrefServiceSimple*>(prefs)->SetManagedPref(
prefs::kAccessibilityFaceGazeEnabled,
std::make_unique<base::Value>(false));
EXPECT_TRUE(prefs->IsManagedPreference(prefs::kAccessibilityFaceGazeEnabled));
EXPECT_FALSE(controller->face_gaze().enabled());
EXPECT_FALSE(controller->IsFaceGazeSettingVisibleInTray());
}
TEST_F(AccessibilityControllerTest, SetFocusHighlightEnabled) {
AccessibilityControllerImpl* controller =
Shell::Get()->accessibility_controller();

@ -1154,6 +1154,9 @@ Style notes:
<message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_DICTATION" desc="The label used in the accessibility menu of the system tray to toggle on/off the speak to type feature.">
Dictation
</message>
<message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_FACEGAZE" desc="The label used in the accessibility menu of the system tray to toggle on/off the FaceGaze feature.">
Face control
</message>
<message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_COLOR_CORRECTION" desc="The label used in the accessibility menu of the system tray to toggle on/off the color correction feature.">
Color correction
</message>

@ -0,0 +1 @@
fd3dc2f7f563be23a68dc45f53e4ee81f77bc1ad

@ -113,6 +113,7 @@ aggregate_vector_icons("ash_vector_icons") {
"eche_minimize.icon",
"eight_files.icon",
"expand_all.icon",
"facegaze.icon",
"feedback.icon",
"files_app.icon",
"filter.icon",

@ -0,0 +1,106 @@
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 24,
MOVE_TO, 12, 20,
CUBIC_TO, 9.77f, 20, 7.88f, 19.23f, 6.33f, 17.68f,
CUBIC_TO, 4.78f, 16.13f, 4, 14.23f, 4, 12,
CUBIC_TO, 4, 9.77f, 4.78f, 7.88f, 6.33f, 6.33f,
CUBIC_TO, 7.88f, 4.78f, 9.77f, 4, 12, 4,
CUBIC_TO, 14.23f, 4, 16.13f, 4.78f, 17.68f, 6.33f,
CUBIC_TO, 19.23f, 7.88f, 20, 9.77f, 20, 12,
CUBIC_TO, 20, 14.23f, 19.23f, 16.13f, 17.68f, 17.68f,
CUBIC_TO, 16.13f, 19.23f, 14.23f, 20, 12, 20,
CLOSE,
MOVE_TO, 12, 18,
CUBIC_TO, 13.67f, 18, 15.08f, 17.42f, 16.25f, 16.25f,
CUBIC_TO, 17.42f, 15.08f, 18, 13.67f, 18, 12,
CUBIC_TO, 18, 11.72f, 17.98f, 11.44f, 17.93f, 11.18f,
CUBIC_TO, 17.89f, 10.89f, 17.83f, 10.62f, 17.75f, 10.35f,
CUBIC_TO, 17.5f, 10.4f, 17.25f, 10.44f, 17, 10.48f,
CUBIC_TO, 16.75f, 10.49f, 16.5f, 10.5f, 16.25f, 10.5f,
CUBIC_TO, 15.2f, 10.5f, 14.2f, 10.3f, 13.25f, 9.9f,
CUBIC_TO, 12.3f, 9.5f, 11.45f, 8.92f, 10.7f, 8.15f,
CUBIC_TO, 10.23f, 9.1f, 9.59f, 9.93f, 8.78f, 10.63f,
CUBIC_TO, 7.96f, 11.33f, 7.03f, 11.83f, 6, 12.15f,
CUBIC_TO, 6.05f, 13.78f, 6.65f, 15.17f, 7.8f, 16.3f,
CUBIC_TO, 8.97f, 17.43f, 10.37f, 18, 12, 18,
CLOSE,
MOVE_TO, 6.4f, 9.85f,
CUBIC_TO, 7.13f, 9.47f, 7.69f, 9.03f, 8.07f, 8.53f,
CUBIC_TO, 8.46f, 8.01f, 8.83f, 7.4f, 9.2f, 6.7f,
CUBIC_TO, 8.57f, 7.03f, 8.01f, 7.48f, 7.53f, 8.03f,
CUBIC_TO, 7.04f, 8.56f, 6.67f, 9.17f, 6.4f, 9.85f,
CLOSE,
MOVE_TO, 9.5f, 14,
CUBIC_TO, 9.22f, 14, 8.98f, 13.91f, 8.78f, 13.73f,
CUBIC_TO, 8.59f, 13.53f, 8.5f, 13.28f, 8.5f, 13,
CUBIC_TO, 8.5f, 12.72f, 8.59f, 12.48f, 8.78f, 12.3f,
CUBIC_TO, 8.98f, 12.1f, 9.22f, 12, 9.5f, 12,
CUBIC_TO, 9.78f, 12, 10.02f, 12.1f, 10.2f, 12.3f,
CUBIC_TO, 10.4f, 12.48f, 10.5f, 12.72f, 10.5f, 13,
CUBIC_TO, 10.5f, 13.28f, 10.4f, 13.53f, 10.2f, 13.73f,
CUBIC_TO, 10.02f, 13.91f, 9.78f, 14, 9.5f, 14,
CLOSE,
MOVE_TO, 16.25f, 8.5f,
CUBIC_TO, 16.35f, 8.5f, 16.45f, 8.5f, 16.55f, 8.5f,
CUBIC_TO, 16.65f, 8.5f, 16.75f, 8.49f, 16.85f, 8.48f,
CUBIC_TO, 16.3f, 7.73f, 15.6f, 7.13f, 14.75f, 6.68f,
CUBIC_TO, 13.92f, 6.23f, 13, 6, 12, 6,
CUBIC_TO, 11.9f, 6, 11.8f, 6, 11.7f, 6,
CUBIC_TO, 11.6f, 6, 11.51f, 6.01f, 11.43f, 6.03f,
CUBIC_TO, 12.08f, 6.78f, 12.76f, 7.38f, 13.48f, 7.83f,
CUBIC_TO, 14.21f, 8.28f, 15.13f, 8.5f, 16.25f, 8.5f,
CLOSE,
MOVE_TO, 14.5f, 14,
CUBIC_TO, 14.22f, 14, 13.98f, 13.91f, 13.78f, 13.73f,
CUBIC_TO, 13.59f, 13.53f, 13.5f, 13.28f, 13.5f, 13,
CUBIC_TO, 13.5f, 12.72f, 13.59f, 12.48f, 13.78f, 12.3f,
CUBIC_TO, 13.98f, 12.1f, 14.22f, 12, 14.5f, 12,
CUBIC_TO, 14.78f, 12, 15.02f, 12.1f, 15.2f, 12.3f,
CUBIC_TO, 15.4f, 12.48f, 15.5f, 12.72f, 15.5f, 13,
CUBIC_TO, 15.5f, 13.28f, 15.4f, 13.53f, 15.2f, 13.73f,
CUBIC_TO, 15.02f, 13.91f, 14.78f, 14, 14.5f, 14,
CLOSE,
MOVE_TO, 1, 6,
V_LINE_TO, 3,
CUBIC_TO, 1, 2.45f, 1.19f, 1.98f, 1.58f, 1.6f,
CUBIC_TO, 1.98f, 1.2f, 2.45f, 1, 3, 1,
H_LINE_TO, 6,
V_LINE_TO, 3,
H_LINE_TO, 3,
V_LINE_TO, 6,
H_LINE_TO, 1,
CLOSE,
MOVE_TO, 6, 23,
H_LINE_TO, 3,
CUBIC_TO, 2.45f, 23, 1.98f, 22.81f, 1.58f, 22.43f,
CUBIC_TO, 1.19f, 22.03f, 1, 21.55f, 1, 21,
V_LINE_TO, 18,
H_LINE_TO, 3,
V_LINE_TO, 21,
H_LINE_TO, 6,
V_LINE_TO, 23,
CLOSE,
MOVE_TO, 18, 23,
V_LINE_TO, 21,
H_LINE_TO, 21,
V_LINE_TO, 18,
H_LINE_TO, 23,
V_LINE_TO, 21,
CUBIC_TO, 23, 21.55f, 22.8f, 22.03f, 22.4f, 22.43f,
CUBIC_TO, 22.02f, 22.81f, 21.55f, 23, 21, 23,
H_LINE_TO, 18,
CLOSE,
MOVE_TO, 21, 6,
V_LINE_TO, 3,
H_LINE_TO, 18,
V_LINE_TO, 1,
H_LINE_TO, 21,
CUBIC_TO, 21.55f, 1, 22.02f, 1.2f, 22.4f, 1.6f,
CUBIC_TO, 22.8f, 1.98f, 23, 2.45f, 23, 3,
V_LINE_TO, 6,
H_LINE_TO, 21,
CLOSE,
NEW_PATH

@ -27,6 +27,7 @@
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/tray/tray_toggle_button.h"
#include "ash/system/tray/tri_view.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/metrics/user_metrics.h"
#include "components/live_caption/caption_util.h"
@ -174,6 +175,11 @@ void AccessibilityDetailedView::OnAccessibilityStatusChanged() {
UpdateFeatureState(checked, dictation_view_, dictation_top_view_);
}
if (controller->IsFaceGazeSettingVisibleInTray()) {
bool checked = controller->face_gaze().enabled();
UpdateFeatureState(checked, facegaze_view_, facegaze_top_view_);
}
if (controller->IsColorCorrectionSettingVisibleInTray()) {
bool checked = controller->color_correction().enabled();
UpdateFeatureState(checked, color_correction_view_,
@ -286,6 +292,10 @@ void AccessibilityDetailedView::AddEnabledFeatures(views::View* container) {
controller->dictation().enabled()) {
dictation_top_view_ = AddDictationView(container);
}
if (controller->IsFaceGazeSettingVisibleInTray() &&
controller->face_gaze().enabled()) {
facegaze_top_view_ = AddFaceGazeView(container);
}
if (controller->IsColorCorrectionSettingVisibleInTray() &&
controller->color_correction().enabled()) {
color_correction_top_view_ = AddColorCorrectionView(container);
@ -361,6 +371,10 @@ void AccessibilityDetailedView::AddAllFeatures(views::View* container) {
dictation_view_ = AddDictationView(container);
}
if (controller->IsFaceGazeSettingVisibleInTray()) {
facegaze_view_ = AddFaceGazeView(container);
}
if (controller->IsColorCorrectionSettingVisibleInTray()) {
color_correction_view_ = AddColorCorrectionView(container);
}
@ -453,6 +467,19 @@ HoverHighlightView* AccessibilityDetailedView::AddDictationView(
checked, controller->IsEnterpriseIconVisibleForDictation());
}
HoverHighlightView* AccessibilityDetailedView::AddFaceGazeView(
views::View* container) {
if (!base::FeatureList::IsEnabled(::features::kAccessibilityFaceGaze)) {
return nullptr;
}
auto* controller = Shell::Get()->accessibility_controller();
bool checked = controller->face_gaze().enabled();
return AddScrollListFeatureItem(
container, kFacegazeIcon,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBILITY_FACEGAZE),
checked, controller->IsEnterpriseIconVisibleForFaceGaze());
}
HoverHighlightView* AccessibilityDetailedView::AddColorCorrectionView(
views::View* container) {
auto* controller = Shell::Get()->accessibility_controller();
@ -677,6 +704,12 @@ void AccessibilityDetailedView::HandleViewClicked(views::View* view) {
RecordAction(new_state ? UserMetricsAction("StatusArea_DictationEnabled")
: UserMetricsAction("StatusArea_DictationDisabled"));
controller->dictation().SetEnabled(new_state);
} else if ((view == facegaze_view_ || view == facegaze_top_view_) &&
!controller->IsEnterpriseIconVisibleForFaceGaze()) {
bool new_state = !controller->face_gaze().enabled();
RecordAction(new_state ? UserMetricsAction("StatusArea_FaceGazeEnabled")
: UserMetricsAction("StatusArea_FaceGazeDisabled"));
controller->face_gaze().SetEnabled(new_state);
} else if ((view == color_correction_view_ ||
view == color_correction_top_view_) &&
!controller->IsEnterpriseIconVisibleForColorCorrection()) {

@ -78,6 +78,7 @@ class ASH_EXPORT AccessibilityDetailedView
HoverHighlightView* AddSpokenFeedbackView(views::View* container);
HoverHighlightView* AddSelectToSpeakView(views::View* container);
HoverHighlightView* AddDictationView(views::View* container);
HoverHighlightView* AddFaceGazeView(views::View* container);
HoverHighlightView* AddColorCorrectionView(views::View* container);
HoverHighlightView* AddHighContrastView(views::View* container);
HoverHighlightView* AddScreenMagnifierView(views::View* container);
@ -126,6 +127,7 @@ class ASH_EXPORT AccessibilityDetailedView
raw_ptr<HoverHighlightView, ExperimentalAsh> spoken_feedback_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> select_to_speak_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> dictation_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> facegaze_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> color_correction_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> high_contrast_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> screen_magnifier_view_ = nullptr;
@ -150,6 +152,7 @@ class ASH_EXPORT AccessibilityDetailedView
raw_ptr<HoverHighlightView, ExperimentalAsh> select_to_speak_top_view_ =
nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> dictation_top_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> facegaze_top_view_ = nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> color_correction_top_view_ =
nullptr;
raw_ptr<HoverHighlightView, ExperimentalAsh> high_contrast_top_view_ =

@ -46,7 +46,7 @@ TEST_F(AccessibilityDetailedViewPixelTest, Basics) {
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
"check_view",
/*revision_number=*/9, detailed_view_container));
/*revision_number=*/10, detailed_view_container));
}
} // namespace ash

@ -28,6 +28,7 @@
#include "ui/accessibility/ax_enums.mojom-shared.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/views/controls/label.h"
#include "ui/views/view.h"
#include "ui/views/view_utils.h"
namespace ash {
@ -65,6 +66,10 @@ void EnableDictation(bool enabled) {
Shell::Get()->accessibility_controller()->dictation().SetEnabled(enabled);
}
void EnableFaceGaze(bool enabled) {
Shell::Get()->accessibility_controller()->face_gaze().SetEnabled(enabled);
}
void EnableHighContrast(bool enabled) {
Shell::Get()->accessibility_controller()->high_contrast().SetEnabled(enabled);
}
@ -150,7 +155,8 @@ class AccessibilityDetailedViewTest : public AshTestBase,
AccessibilityDetailedViewTest() {
scoped_feature_list_.InitWithFeatures(
{media::kLiveCaption, media::kLiveCaptionSystemWideOnChromeOS,
ash::features::kOnDeviceSpeechRecognition},
ash::features::kOnDeviceSpeechRecognition,
::features::kAccessibilityFaceGaze},
{});
}
AccessibilityDetailedViewTest(const AccessibilityDetailedViewTest&) = delete;
@ -259,6 +265,10 @@ class AccessibilityDetailedViewTest : public AshTestBase,
ClickView(detailed_menu_->dictation_view_);
}
void ClickFaceGazeOnDetailMenu() {
ClickView(detailed_menu_->facegaze_view_);
}
void ClickColorCorrectionOnDetailMenu() {
ClickView(detailed_menu_->color_correction_view_);
}
@ -275,6 +285,10 @@ class AccessibilityDetailedViewTest : public AshTestBase,
return detailed_menu_->dictation_view_;
}
bool IsFaceGazeShownOnDetailMenu() const {
return detailed_menu_->facegaze_view_;
}
bool IsHighContrastMenuShownOnDetailMenu() const {
return detailed_menu_->high_contrast_view_;
}
@ -370,6 +384,11 @@ class AccessibilityDetailedViewTest : public AshTestBase,
detailed_menu_->dictation_view_);
}
bool IsFaceGazeEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->face_gaze().enabled(),
detailed_menu_->facegaze_view_);
}
bool IsHighContrastEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->high_contrast().enabled(),
detailed_menu_->high_contrast_view_);
@ -471,6 +490,7 @@ class AccessibilityDetailedViewTest : public AshTestBase,
views::View* dictation_view() const {
return detailed_menu_->dictation_view_;
}
views::View* facegaze_view() const { return detailed_menu_->facegaze_view_; }
views::View* high_contrast_view() const {
return detailed_menu_->high_contrast_view_;
}
@ -524,6 +544,9 @@ class AccessibilityDetailedViewTest : public AshTestBase,
HoverHighlightView* dictation_top_view() const {
return detailed_menu_->dictation_top_view_;
}
HoverHighlightView* facegaze_top_view() const {
return detailed_menu_->facegaze_top_view_;
}
HoverHighlightView* high_contrast_top_view() const {
return detailed_menu_->high_contrast_top_view_;
}
@ -608,6 +631,7 @@ TEST_F(AccessibilityDetailedViewTest, ListItemsAreInRoundedContainer) {
EXPECT_TRUE(has_rounded_container_parent(sticky_keys_view()));
EXPECT_TRUE(has_rounded_container_parent(switch_access_view()));
EXPECT_TRUE(has_rounded_container_parent(color_correction_view()));
EXPECT_TRUE(has_rounded_container_parent(facegaze_view()));
CloseDetailMenu();
}
@ -648,6 +672,7 @@ TEST_F(AccessibilityDetailedViewTest, TopsViewsAreEmptyWithNoFeaturesEnabled) {
EXPECT_FALSE(sticky_keys_top_view());
EXPECT_FALSE(switch_access_top_view());
EXPECT_FALSE(color_correction_top_view());
EXPECT_FALSE(facegaze_top_view());
}
// Verifies that pressing the tab key moves from row to row. In particular,
@ -661,6 +686,8 @@ TEST_F(AccessibilityDetailedViewTest, TabMovesFocusBetweenRows) {
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(dictation_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(facegaze_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(color_correction_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(high_contrast_view()->HasFocus());
@ -729,6 +756,19 @@ TEST_F(AccessibilityDetailedViewTest, DictationTopView) {
EXPECT_FALSE(controller()->dictation().enabled());
}
TEST_F(AccessibilityDetailedViewTest, FaceGazeTopView) {
EnableFaceGaze(true);
CreateDetailedMenu();
ASSERT_TRUE(facegaze_top_view());
EXPECT_TRUE(IsSwitchToggled(facegaze_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(facegaze_top_view()));
ClickView(facegaze_top_view());
EXPECT_FALSE(IsSwitchToggled(facegaze_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(facegaze_top_view()));
EXPECT_FALSE(controller()->face_gaze().enabled());
}
TEST_F(AccessibilityDetailedViewTest, HighContrastTopView) {
EnableHighContrast(true);
CreateDetailedMenu();
@ -942,6 +982,7 @@ TEST_F(AccessibilityDetailedViewTest, CheckMenuVisibilityOnDetailMenu) {
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
CloseDetailMenu();
// Simulate screen lock.
@ -966,6 +1007,7 @@ TEST_F(AccessibilityDetailedViewTest, CheckMenuVisibilityOnDetailMenu) {
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
CloseDetailMenu();
UnblockUserSession();
@ -991,6 +1033,7 @@ TEST_F(AccessibilityDetailedViewTest, CheckMenuVisibilityOnDetailMenu) {
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
CloseDetailMenu();
UnblockUserSession();
}
@ -1184,6 +1227,17 @@ TEST_F(AccessibilityDetailedViewTest, ClickDetailMenu) {
CreateDetailedMenu();
ClickColorCorrectionOnDetailMenu();
EXPECT_FALSE(accessibility_controller->color_correction().enabled());
// Confirms that the check item toggles color correction.
EXPECT_FALSE(accessibility_controller->face_gaze().enabled());
CreateDetailedMenu();
ClickFaceGazeOnDetailMenu();
EXPECT_TRUE(accessibility_controller->face_gaze().enabled());
CreateDetailedMenu();
ClickFaceGazeOnDetailMenu();
EXPECT_FALSE(accessibility_controller->face_gaze().enabled());
}
class AccessibilityDetailedViewSodaTest
@ -1358,6 +1412,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, NothingCheckedByDefault) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1385,6 +1440,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, SpokenFeedback) {
EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1410,6 +1466,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, SpokenFeedback) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1461,6 +1518,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, SelectToSpeak) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1486,6 +1544,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, SelectToSpeak) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1513,6 +1572,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, Dictation) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_TRUE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1538,6 +1598,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, Dictation) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1565,6 +1626,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, HighContrast) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1590,6 +1652,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, HighContrast) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1617,6 +1680,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, FullScreenMagnifier) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1642,6 +1706,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, FullScreenMagnifier) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1669,6 +1734,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, DockedMagnifier) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1694,6 +1760,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, DockedMagnifier) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1721,6 +1788,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, LargeCursor) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1746,6 +1814,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, LargeCursor) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1773,6 +1842,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, LiveCaption) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1798,6 +1868,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, LiveCaption) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1825,6 +1896,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, VirtualKeyboard) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1850,6 +1922,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, VirtualKeyboard) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1877,6 +1950,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, MonoAudio) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1902,6 +1976,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, MonoAudio) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1929,6 +2004,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, CaretHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1954,6 +2030,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, CaretHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -1981,6 +2058,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, CursorHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2006,6 +2084,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, CursorHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2033,6 +2112,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, FocusHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2058,6 +2138,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, FocusHighlight) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2085,6 +2166,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, StickyKeys) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2110,6 +2192,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, StickyKeys) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2183,6 +2266,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, AllFeatures) {
EnableSpokenFeedback(true);
EnableSelectToSpeak(true);
EnableDictation(true);
EnableFaceGaze(true);
EnableHighContrast(true);
SetScreenMagnifierEnabled(true);
SetDockedMagnifierEnabled(true);
@ -2200,6 +2284,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, AllFeatures) {
EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_TRUE(IsDictationEnabledOnDetailMenu());
EXPECT_TRUE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2221,6 +2306,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, AllFeatures) {
EnableSpokenFeedback(false);
EnableSelectToSpeak(false);
EnableDictation(false);
EnableFaceGaze(false);
EnableHighContrast(false);
SetScreenMagnifierEnabled(false);
SetDockedMagnifierEnabled(false);
@ -2238,6 +2324,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, AllFeatures) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2265,6 +2352,7 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, Autoclick) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
@ -2290,6 +2378,61 @@ TEST_F(AccessibilityDetailedViewLoginScreenTest, Autoclick) {
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsLiveCaptionEnabledOnDetailMenu());
EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu());
EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
// Switch Access is currently not available on the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
// Color correction cannot be enabled from the login screen.
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, FaceGaze) {
// Enabling facegaze.
EnableFaceGaze(true);
CreateDetailedMenu();
EXPECT_TRUE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsLiveCaptionEnabledOnDetailMenu());
EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu());
EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
// Switch Access is currently not available on the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
// Color correction cannot be enabled from the login screen.
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
CloseDetailMenu();
// Disabling facegaze.
EnableFaceGaze(false);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());

@ -36080,6 +36080,20 @@ should be able to be added at any place in this file.
<description>Please enter the description of this user action.</description>
</action>
<action name="StatusArea_FaceGazeDisabled">
<owner>katie@chromium.org</owner>
<owner>akihiroota@chromium.org</owner>
<owner>bkersting@google.com</owner>
<description>Ash system menu: Accessibility: Disable FaceGaze.</description>
</action>
<action name="StatusArea_FaceGazeEnabled">
<owner>katie@chromium.org</owner>
<owner>akihiroota@chromium.org</owner>
<owner>bkersting@google.com</owner>
<description>Ash system menu: Accessibility: Enable FaceGaze.</description>
</action>
<action name="StatusArea_FocusMode_Detailed">
<owner>richui@chromium.org</owner>
<description>