#include "ash/system/accessibility/accessibility_detailed_view.h"
#include <memory>
#include "ash/accessibility/accessibility_controller.h"
#include "ash/accessibility/accessibility_observer.h"
#include "ash/accessibility/magnifier/docked_magnifier_controller.h"
#include "ash/constants/ash_features.h"
#include "ash/constants/ash_pref_names.h"
#include "ash/session/session_controller_impl.h"
#include "ash/shell.h"
#include "ash/style/rounded_container.h"
#include "ash/style/switch.h"
#include "ash/system/model/enterprise_domain_model.h"
#include "ash/system/model/system_tray_model.h"
#include "ash/system/tray/fake_detailed_view_delegate.h"
#include "ash/system/tray/hover_highlight_view.h"
#include "ash/test/ash_test_base.h"
#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "components/live_caption/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/soda/soda_installer_impl_chromeos.h"
#include "media/base/media_switches.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_enums.mojom-shared.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/label.h"
#include "ui/views/view.h"
#include "ui/views/view_utils.h"
namespace ash {
namespace {
const std::u16string kInitialFeatureViewSubtitleText = u"This is a test";
const std::u16string kSodaDownloaded = u"Speech files downloaded";
const std::u16string kSodaInProgress25 =
u"Downloading speech recognition files… 25%";
const std::u16string kSodaInProgress50 =
u"Downloading speech recognition files… 50%";
const std::u16string kSodaFailed =
u"Can't download speech files. Try again later.";
void SetScreenMagnifierEnabled(bool enabled) {
Shell::Get()->accessibility_delegate()->SetMagnifierEnabled(enabled);
}
void SetDockedMagnifierEnabled(bool enabled) {
Shell::Get()->accessibility_controller()->docked_magnifier().SetEnabled(
enabled);
}
void EnableSpokenFeedback(bool enabled) {
Shell::Get()->accessibility_controller()->SetSpokenFeedbackEnabled(
enabled, A11Y_NOTIFICATION_NONE);
}
void EnableSelectToSpeak(bool enabled) {
Shell::Get()->accessibility_controller()->select_to_speak().SetEnabled(
enabled);
}
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);
}
void EnableAutoclick(bool enabled) {
Shell::Get()->accessibility_controller()->autoclick().SetEnabled(enabled);
}
void EnableVirtualKeyboard(bool enabled) {
Shell::Get()->accessibility_controller()->virtual_keyboard().SetEnabled(
enabled);
}
void EnableLargeCursor(bool enabled) {
Shell::Get()->accessibility_controller()->large_cursor().SetEnabled(enabled);
}
void EnableLiveCaption(bool enabled) {
Shell::Get()->accessibility_controller()->live_caption().SetEnabled(enabled);
}
void EnableMonoAudio(bool enabled) {
Shell::Get()->accessibility_controller()->mono_audio().SetEnabled(enabled);
}
void SetCaretHighlightEnabled(bool enabled) {
Shell::Get()->accessibility_controller()->caret_highlight().SetEnabled(
enabled);
}
void SetCursorHighlightEnabled(bool enabled) {
Shell::Get()->accessibility_controller()->cursor_highlight().SetEnabled(
enabled);
}
void SetFocusHighlightEnabled(bool enabled) {
Shell::Get()->accessibility_controller()->focus_highlight().SetEnabled(
enabled);
}
void EnableStickyKeys(bool enabled) {
Shell::Get()->accessibility_controller()->sticky_keys().SetEnabled(enabled);
}
void EnableSwitchAccess(bool enabled) {
Shell::Get()->accessibility_controller()->switch_access().SetEnabled(enabled);
}
void EnableColorCorrection(bool enabled) {
Shell::Get()->accessibility_controller()->color_correction().SetEnabled(
enabled);
}
void EnableReducedAnimations(bool enabled) {
Shell::Get()->accessibility_controller()->reduced_animations().SetEnabled(
enabled);
}
speech::LanguageCode en_us() {
return speech::LanguageCode::kEnUs;
}
speech::LanguageCode fr_fr() {
return speech::LanguageCode::kFrFr;
}
bool IsCheckedForAccessibility(views::View* view) {
ui::AXNodeData node_data;
view->GetViewAccessibility().GetAccessibleNodeData(&node_data);
return node_data.GetCheckedState() == ax::mojom::CheckedState::kTrue;
}
bool IsSwitchToggled(HoverHighlightView* item) {
views::View* right_view = item->right_view();
if (!views::IsViewClass<Switch>(right_view)) {
return false;
}
return static_cast<Switch*>(right_view)->GetIsOn();
}
}
class AccessibilityDetailedViewTest : public AshTestBase,
public AccessibilityObserver {
public:
AccessibilityDetailedViewTest() {
scoped_feature_list_.InitWithFeatures(
{ash::features::kOnDeviceSpeechRecognition,
::features::kAccessibilityReducedAnimationsInKiosk},
{});
}
AccessibilityDetailedViewTest(const AccessibilityDetailedViewTest&) = delete;
AccessibilityDetailedViewTest& operator=(
const AccessibilityDetailedViewTest&) = delete;
~AccessibilityDetailedViewTest() override = default;
protected:
void SetUp() override {
AshTestBase::SetUp();
controller_ = Shell::Get()->accessibility_controller();
controller_->AddObserver(this);
}
void TearDown() override {
CloseDetailMenu();
controller_->RemoveObserver(this);
controller_ = nullptr;
AshTestBase::TearDown();
}
void CreateDetailedMenu() {
widget_ = CreateFramelessTestWidget();
widget_->SetFullscreen(true);
delegate_ = std::make_unique<FakeDetailedViewDelegate>();
detailed_menu_ = widget_->SetContentsView(
std::make_unique<AccessibilityDetailedView>(delegate_.get()));
}
void CloseDetailMenu() {
widget_.reset();
detailed_menu_ = nullptr;
delegate_.reset();
}
void ClickView(HoverHighlightView* view) {
detailed_menu_->OnViewClicked(view);
}
void ClickSpokenFeedbackOnDetailMenu() {
ClickView(detailed_menu_->spoken_feedback_view_);
}
void ClickHighContrastOnDetailMenu() {
ClickView(detailed_menu_->high_contrast_view_);
}
void ClickScreenMagnifierOnDetailMenu() {
ClickView(detailed_menu_->screen_magnifier_view_);
}
void ClickDockedMagnifierOnDetailMenu() {
ClickView(detailed_menu_->docked_magnifier_view_);
}
void ClickAutoclickOnDetailMenu() {
ClickView(detailed_menu_->autoclick_view_);
}
void ClickVirtualKeyboardOnDetailMenu() {
ClickView(detailed_menu_->virtual_keyboard_view_);
}
void ClickLargeMouseCursorOnDetailMenu() {
ClickView(detailed_menu_->large_cursor_view_);
}
void ClickLiveCaptionOnDetailMenu() {
ClickView(detailed_menu_->live_caption_view_);
}
void ClickMonoAudioOnDetailMenu() {
ClickView(detailed_menu_->mono_audio_view_);
}
void ClickCaretHighlightOnDetailMenu() {
ClickView(detailed_menu_->caret_highlight_view_);
}
void ClickHighlightMouseCursorOnDetailMenu() {
ClickView(detailed_menu_->highlight_mouse_cursor_view_);
}
void ClickHighlightKeyboardFocusOnDetailMenu() {
ClickView(detailed_menu_->highlight_keyboard_focus_view_);
}
void ClickStickyKeysOnDetailMenu() {
ClickView(detailed_menu_->sticky_keys_view_);
}
void ClickReducedAnimationsOnDetailMenu() {
ClickView(detailed_menu_->reduced_animations_view_);
}
void ClickSwitchAccessOnDetailMenu() {
ClickView(detailed_menu_->switch_access_view_);
}
void ClickSelectToSpeakOnDetailMenu() {
ClickView(detailed_menu_->select_to_speak_view_);
}
void ClickDictationOnDetailMenu() {
ClickView(detailed_menu_->dictation_view_);
}
void ClickFaceGazeOnDetailMenu() {
ClickView(detailed_menu_->facegaze_view_);
}
void ClickColorCorrectionOnDetailMenu() {
ClickView(detailed_menu_->color_correction_view_);
}
bool IsSpokenFeedbackMenuShownOnDetailMenu() const {
return detailed_menu_->spoken_feedback_view_;
}
bool IsSelectToSpeakShownOnDetailMenu() const {
return detailed_menu_->select_to_speak_view_;
}
bool IsDictationShownOnDetailMenu() const {
return detailed_menu_->dictation_view_;
}
bool IsFaceGazeShownOnDetailMenu() const {
return detailed_menu_->facegaze_view_;
}
bool IsHighContrastMenuShownOnDetailMenu() const {
return detailed_menu_->high_contrast_view_;
}
bool IsScreenMagnifierMenuShownOnDetailMenu() const {
return detailed_menu_->screen_magnifier_view_;
}
bool IsDockedMagnifierShownOnDetailMenu() const {
return detailed_menu_->docked_magnifier_view_;
}
bool IsLargeCursorMenuShownOnDetailMenu() const {
return detailed_menu_->large_cursor_view_;
}
bool IsLiveCaptionShownOnDetailMenu() const {
return detailed_menu_->live_caption_view_;
}
bool IsAutoclickMenuShownOnDetailMenu() const {
return detailed_menu_->autoclick_view_;
}
bool IsVirtualKeyboardMenuShownOnDetailMenu() const {
return detailed_menu_->virtual_keyboard_view_;
}
bool IsMonoAudioMenuShownOnDetailMenu() const {
return detailed_menu_->mono_audio_view_;
}
bool IsCaretHighlightMenuShownOnDetailMenu() const {
return detailed_menu_->caret_highlight_view_;
}
bool IsHighlightMouseCursorMenuShownOnDetailMenu() const {
return detailed_menu_->highlight_mouse_cursor_view_;
}
bool IsHighlightKeyboardFocusMenuShownOnDetailMenu() const {
return detailed_menu_->highlight_keyboard_focus_view_;
}
bool IsStickyKeysMenuShownOnDetailMenu() const {
return detailed_menu_->sticky_keys_view_;
}
bool IsReducedAnimationsShownOnDetailMenu() const {
return detailed_menu_->reduced_animations_view_;
}
bool IsSwitchAccessShownOnDetailMenu() const {
return detailed_menu_->switch_access_view_;
}
bool IsColorCorrectionShownOnDetailMenu() const {
return detailed_menu_->color_correction_view_;
}
bool IsHelpAvailableOnDetailMenu() {
return detailed_menu_->help_view_->GetState() ==
views::Button::STATE_NORMAL;
}
bool IsSettingsAvailableOnDetailMenu() {
return detailed_menu_->settings_view_->GetState() ==
views::Button::STATE_NORMAL;
}
bool IsEnabledOnDetailMenu(bool enabled_state, views::View* view) const {
bool checked_for_accessibility = IsCheckedForAccessibility(view);
DCHECK_EQ(enabled_state, checked_for_accessibility);
return enabled_state && checked_for_accessibility;
}
bool IsSpokenFeedbackEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->spoken_feedback().enabled(),
detailed_menu_->spoken_feedback_view_);
}
bool IsSelectToSpeakEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->select_to_speak().enabled(),
detailed_menu_->select_to_speak_view_);
}
bool IsDictationEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->dictation().enabled(),
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_);
}
bool IsScreenMagnifierEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(
Shell::Get()->accessibility_delegate()->IsMagnifierEnabled(),
detailed_menu_->screen_magnifier_view_);
}
bool IsDockedMagnifierEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->docked_magnifier().enabled(),
detailed_menu_->docked_magnifier_view_);
}
bool IsLargeCursorEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->large_cursor().enabled(),
detailed_menu_->large_cursor_view_);
}
bool IsLiveCaptionEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->live_caption().enabled(),
detailed_menu_->live_caption_view_);
}
bool IsAutoclickEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->autoclick().enabled(),
detailed_menu_->autoclick_view_);
}
bool IsVirtualKeyboardEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->virtual_keyboard().enabled(),
detailed_menu_->virtual_keyboard_view_);
}
bool IsMonoAudioEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->mono_audio().enabled(),
detailed_menu_->mono_audio_view_);
}
bool IsCaretHighlightEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->caret_highlight().enabled(),
detailed_menu_->caret_highlight_view_);
}
bool IsHighlightMouseCursorEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->cursor_highlight().enabled(),
detailed_menu_->highlight_mouse_cursor_view_);
}
bool IsHighlightKeyboardFocusEnabledOnDetailMenu() const {
if (IsSpokenFeedbackEnabledOnDetailMenu()) {
DCHECK(!detailed_menu_->highlight_keyboard_focus_view_);
return false;
}
return IsEnabledOnDetailMenu(
controller_->focus_highlight().enabled(),
detailed_menu_->highlight_keyboard_focus_view_);
}
bool IsStickyKeysEnabledOnDetailMenu() const {
if (IsSpokenFeedbackEnabledOnDetailMenu()) {
DCHECK(!detailed_menu_->sticky_keys_view_);
return false;
}
return IsEnabledOnDetailMenu(controller_->sticky_keys().enabled(),
detailed_menu_->sticky_keys_view_);
}
bool IsReducedAnimationsEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->reduced_animations().enabled(),
detailed_menu_->reduced_animations_view_);
}
bool IsSwitchAccessEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->switch_access().enabled(),
detailed_menu_->switch_access_view_);
}
bool IsColorCorrectionEnabledOnDetailMenu() const {
return IsEnabledOnDetailMenu(controller_->color_correction().enabled(),
detailed_menu_->color_correction_view_);
}
void SetUpKioskSession() {
auto* session_controller = Shell::Get()->session_controller();
SessionInfo info;
info.state = session_controller->GetSessionState();
info.is_running_in_app_mode = true;
session_controller->SetSessionInfo(info);
UserSession session;
session.session_id = 1;
session.user_info.type = user_manager::UserType::kKioskChromeApp;
session_controller->UpdateUserSession(session);
}
AccessibilityController* controller() { return controller_; }
AccessibilityDetailedView* detailed_menu() { return detailed_menu_; }
views::View* scroll_content() { return detailed_menu_->scroll_content(); }
views::View* spoken_feedback_view() const {
return detailed_menu_->spoken_feedback_view_;
}
views::View* select_to_speak_view() const {
return detailed_menu_->select_to_speak_view_;
}
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_;
}
views::View* screen_magnifier_view() const {
return detailed_menu_->screen_magnifier_view_;
}
views::View* docked_magnifier_view() const {
return detailed_menu_->docked_magnifier_view_;
}
views::View* large_cursor_view() const {
return detailed_menu_->large_cursor_view_;
}
views::View* live_caption_view() const {
return detailed_menu_->live_caption_view_;
}
views::View* autoclick_view() const {
return detailed_menu_->autoclick_view_;
}
views::View* virtual_keyboard_view() const {
return detailed_menu_->virtual_keyboard_view_;
}
views::View* mono_audio_view() const {
return detailed_menu_->mono_audio_view_;
}
views::View* caret_highlight_view() const {
return detailed_menu_->caret_highlight_view_;
}
views::View* highlight_mouse_cursor_view() const {
return detailed_menu_->highlight_mouse_cursor_view_;
}
views::View* highlight_keyboard_focus_view() const {
return detailed_menu_->highlight_keyboard_focus_view_;
}
views::View* sticky_keys_view() const {
return detailed_menu_->sticky_keys_view_;
}
views::View* reduced_animations_view() const {
return detailed_menu_->reduced_animations_view_;
}
views::View* switch_access_view() const {
return detailed_menu_->switch_access_view_;
}
views::View* color_correction_view() const {
return detailed_menu_->color_correction_view_;
}
HoverHighlightView* spoken_feedback_top_view() const {
return detailed_menu_->spoken_feedback_top_view_;
}
HoverHighlightView* select_to_speak_top_view() const {
return detailed_menu_->select_to_speak_top_view_;
}
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_;
}
HoverHighlightView* screen_magnifier_top_view() const {
return detailed_menu_->screen_magnifier_top_view_;
}
HoverHighlightView* docked_magnifier_top_view() const {
return detailed_menu_->docked_magnifier_top_view_;
}
HoverHighlightView* large_cursor_top_view() const {
return detailed_menu_->large_cursor_top_view_;
}
HoverHighlightView* live_caption_top_view() const {
return detailed_menu_->live_caption_top_view_;
}
HoverHighlightView* autoclick_top_view() const {
return detailed_menu_->autoclick_top_view_;
}
HoverHighlightView* virtual_keyboard_top_view() const {
return detailed_menu_->virtual_keyboard_top_view_;
}
HoverHighlightView* mono_audio_top_view() const {
return detailed_menu_->mono_audio_top_view_;
}
HoverHighlightView* caret_highlight_top_view() const {
return detailed_menu_->caret_highlight_top_view_;
}
HoverHighlightView* highlight_mouse_cursor_top_view() const {
return detailed_menu_->highlight_mouse_cursor_top_view_;
}
HoverHighlightView* highlight_keyboard_focus_top_view() const {
return detailed_menu_->highlight_keyboard_focus_top_view_;
}
HoverHighlightView* sticky_keys_top_view() const {
return detailed_menu_->sticky_keys_top_view_;
}
HoverHighlightView* reduced_animations_top_view() const {
return detailed_menu_->reduced_animations_top_view_;
}
HoverHighlightView* switch_access_top_view() const {
return detailed_menu_->switch_access_top_view_;
}
HoverHighlightView* color_correction_top_view() const {
return detailed_menu_->color_correction_top_view_;
}
private:
void OnAccessibilityStatusChanged() override {
if (detailed_menu_) {
detailed_menu_->OnAccessibilityStatusChanged();
}
}
raw_ptr<AccessibilityController> controller_ = nullptr;
std::unique_ptr<views::Widget> widget_;
std::unique_ptr<DetailedViewDelegate> delegate_;
raw_ptr<AccessibilityDetailedView, DanglingUntriaged> detailed_menu_ =
nullptr;
base::test::ScopedFeatureList scoped_feature_list_;
};
TEST_F(AccessibilityDetailedViewTest, ListItemsAreInRoundedContainer) {
CreateDetailedMenu();
auto has_rounded_container_parent = [](views::View* view) -> bool {
return views::IsViewClass<RoundedContainer>(view->parent());
};
EXPECT_TRUE(has_rounded_container_parent(spoken_feedback_view()));
EXPECT_TRUE(has_rounded_container_parent(select_to_speak_view()));
EXPECT_TRUE(has_rounded_container_parent(dictation_view()));
EXPECT_TRUE(has_rounded_container_parent(high_contrast_view()));
EXPECT_TRUE(has_rounded_container_parent(screen_magnifier_view()));
EXPECT_TRUE(has_rounded_container_parent(docked_magnifier_view()));
EXPECT_TRUE(has_rounded_container_parent(large_cursor_view()));
EXPECT_TRUE(has_rounded_container_parent(live_caption_view()));
EXPECT_TRUE(has_rounded_container_parent(autoclick_view()));
EXPECT_TRUE(has_rounded_container_parent(virtual_keyboard_view()));
EXPECT_TRUE(has_rounded_container_parent(mono_audio_view()));
EXPECT_TRUE(has_rounded_container_parent(caret_highlight_view()));
EXPECT_TRUE(has_rounded_container_parent(highlight_mouse_cursor_view()));
EXPECT_TRUE(has_rounded_container_parent(highlight_keyboard_focus_view()));
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();
}
TEST_F(AccessibilityDetailedViewTest, ContainerCount) {
CreateDetailedMenu();
EXPECT_EQ(1u, scroll_content()->children().size());
CloseDetailMenu();
EnableSpokenFeedback(true);
CreateDetailedMenu();
EXPECT_EQ(2u, scroll_content()->children().size());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewTest, TopsViewsAreEmptyWithNoFeaturesEnabled) {
CreateDetailedMenu();
EXPECT_FALSE(spoken_feedback_top_view());
EXPECT_FALSE(select_to_speak_top_view());
EXPECT_FALSE(dictation_top_view());
EXPECT_FALSE(high_contrast_top_view());
EXPECT_FALSE(screen_magnifier_top_view());
EXPECT_FALSE(docked_magnifier_top_view());
EXPECT_FALSE(large_cursor_top_view());
EXPECT_FALSE(live_caption_top_view());
EXPECT_FALSE(autoclick_top_view());
EXPECT_FALSE(virtual_keyboard_top_view());
EXPECT_FALSE(mono_audio_top_view());
EXPECT_FALSE(caret_highlight_top_view());
EXPECT_FALSE(highlight_mouse_cursor_top_view());
EXPECT_FALSE(highlight_keyboard_focus_top_view());
EXPECT_FALSE(sticky_keys_top_view());
EXPECT_FALSE(switch_access_top_view());
EXPECT_FALSE(color_correction_top_view());
EXPECT_FALSE(facegaze_top_view());
}
TEST_F(AccessibilityDetailedViewTest, TabMovesFocusBetweenRows) {
CreateDetailedMenu();
spoken_feedback_view()->RequestFocus();
EXPECT_TRUE(spoken_feedback_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(select_to_speak_view()->HasFocus());
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());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(screen_magnifier_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(docked_magnifier_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(autoclick_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(virtual_keyboard_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(switch_access_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(live_caption_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(large_cursor_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(mono_audio_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(caret_highlight_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(highlight_mouse_cursor_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(highlight_keyboard_focus_view()->HasFocus());
PressAndReleaseKey(ui::VKEY_TAB);
EXPECT_TRUE(sticky_keys_view()->HasFocus());
}
TEST_F(AccessibilityDetailedViewTest, SpokenFeedbackTopView) {
EnableSpokenFeedback(true);
CreateDetailedMenu();
ASSERT_TRUE(spoken_feedback_top_view());
EXPECT_TRUE(IsSwitchToggled(spoken_feedback_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(spoken_feedback_top_view()));
ClickView(spoken_feedback_top_view());
EXPECT_FALSE(IsSwitchToggled(spoken_feedback_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(spoken_feedback_top_view()));
EXPECT_FALSE(controller()->spoken_feedback().enabled());
}
TEST_F(AccessibilityDetailedViewTest, SelectToSpeakTopView) {
EnableSelectToSpeak(true);
CreateDetailedMenu();
ASSERT_TRUE(select_to_speak_top_view());
EXPECT_TRUE(IsSwitchToggled(select_to_speak_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(select_to_speak_top_view()));
ClickView(select_to_speak_top_view());
EXPECT_FALSE(IsSwitchToggled(select_to_speak_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(select_to_speak_top_view()));
EXPECT_FALSE(controller()->select_to_speak().enabled());
}
TEST_F(AccessibilityDetailedViewTest, DictationTopView) {
EnableDictation(true);
CreateDetailedMenu();
ASSERT_TRUE(dictation_top_view());
EXPECT_TRUE(IsSwitchToggled(dictation_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(dictation_top_view()));
ClickView(dictation_top_view());
EXPECT_FALSE(IsSwitchToggled(dictation_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(dictation_top_view()));
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();
ASSERT_TRUE(high_contrast_top_view());
EXPECT_TRUE(IsSwitchToggled(high_contrast_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(high_contrast_top_view()));
ClickView(high_contrast_top_view());
EXPECT_FALSE(IsSwitchToggled(high_contrast_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(high_contrast_top_view()));
EXPECT_FALSE(controller()->high_contrast().enabled());
}
TEST_F(AccessibilityDetailedViewTest, ScreenMagnifierTopView) {
Shell::Get()->accessibility_delegate()->SetMagnifierEnabled(true);
CreateDetailedMenu();
ASSERT_TRUE(screen_magnifier_top_view());
EXPECT_TRUE(IsSwitchToggled(screen_magnifier_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(screen_magnifier_top_view()));
ClickView(screen_magnifier_top_view());
controller()->NotifyAccessibilityStatusChanged();
EXPECT_FALSE(IsSwitchToggled(screen_magnifier_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(screen_magnifier_top_view()));
EXPECT_FALSE(Shell::Get()->accessibility_delegate()->IsMagnifierEnabled());
}
TEST_F(AccessibilityDetailedViewTest, DockedMagnifierTopView) {
SetDockedMagnifierEnabled(true);
CreateDetailedMenu();
ASSERT_TRUE(docked_magnifier_top_view());
EXPECT_TRUE(IsSwitchToggled(docked_magnifier_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(docked_magnifier_top_view()));
ClickView(docked_magnifier_top_view());
EXPECT_FALSE(IsSwitchToggled(docked_magnifier_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(docked_magnifier_top_view()));
EXPECT_FALSE(Shell::Get()->docked_magnifier_controller()->GetEnabled());
}
TEST_F(AccessibilityDetailedViewTest, LargeCursorTopView) {
EnableLargeCursor(true);
CreateDetailedMenu();
ASSERT_TRUE(large_cursor_top_view());
EXPECT_TRUE(IsSwitchToggled(large_cursor_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(large_cursor_top_view()));
ClickView(large_cursor_top_view());
EXPECT_FALSE(IsSwitchToggled(large_cursor_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(large_cursor_top_view()));
EXPECT_FALSE(controller()->large_cursor().enabled());
}
TEST_F(AccessibilityDetailedViewTest, LiveCaptionTopView) {
EnableLiveCaption(true);
CreateDetailedMenu();
ASSERT_TRUE(live_caption_top_view());
EXPECT_TRUE(IsSwitchToggled(live_caption_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(live_caption_top_view()));
ClickView(live_caption_top_view());
EXPECT_FALSE(IsSwitchToggled(live_caption_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(live_caption_top_view()));
EXPECT_FALSE(controller()->live_caption().enabled());
}
TEST_F(AccessibilityDetailedViewTest, AutoClickTopView) {
EnableAutoclick(true);
CreateDetailedMenu();
ASSERT_TRUE(autoclick_top_view());
EXPECT_TRUE(IsSwitchToggled(autoclick_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(autoclick_top_view()));
ClickView(autoclick_top_view());
EXPECT_FALSE(IsSwitchToggled(autoclick_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(autoclick_top_view()));
EXPECT_FALSE(controller()->autoclick().enabled());
}
TEST_F(AccessibilityDetailedViewTest, VirtualKeyboardTopView) {
EnableVirtualKeyboard(true);
CreateDetailedMenu();
ASSERT_TRUE(virtual_keyboard_top_view());
EXPECT_TRUE(IsSwitchToggled(virtual_keyboard_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(virtual_keyboard_top_view()));
ClickView(virtual_keyboard_top_view());
EXPECT_FALSE(IsSwitchToggled(virtual_keyboard_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(virtual_keyboard_top_view()));
EXPECT_FALSE(controller()->virtual_keyboard().enabled());
}
TEST_F(AccessibilityDetailedViewTest, MonoAudioTopView) {
EnableMonoAudio(true);
CreateDetailedMenu();
ASSERT_TRUE(mono_audio_top_view());
EXPECT_TRUE(IsSwitchToggled(mono_audio_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(mono_audio_top_view()));
ClickView(mono_audio_top_view());
EXPECT_FALSE(IsSwitchToggled(mono_audio_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(mono_audio_top_view()));
EXPECT_FALSE(controller()->mono_audio().enabled());
}
TEST_F(AccessibilityDetailedViewTest, CaretHighlightTopView) {
SetCaretHighlightEnabled(true);
CreateDetailedMenu();
ASSERT_TRUE(caret_highlight_top_view());
EXPECT_TRUE(IsSwitchToggled(caret_highlight_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(caret_highlight_top_view()));
ClickView(caret_highlight_top_view());
EXPECT_FALSE(IsSwitchToggled(caret_highlight_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(caret_highlight_top_view()));
EXPECT_FALSE(controller()->caret_highlight().enabled());
}
TEST_F(AccessibilityDetailedViewTest, HighlightMouseCursorTopView) {
SetCursorHighlightEnabled(true);
CreateDetailedMenu();
ASSERT_TRUE(highlight_mouse_cursor_top_view());
EXPECT_TRUE(IsSwitchToggled(highlight_mouse_cursor_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(highlight_mouse_cursor_top_view()));
ClickView(highlight_mouse_cursor_top_view());
EXPECT_FALSE(IsSwitchToggled(highlight_mouse_cursor_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(highlight_mouse_cursor_top_view()));
EXPECT_FALSE(controller()->cursor_highlight().enabled());
}
TEST_F(AccessibilityDetailedViewTest, HighlightKeyboardFocusTopView) {
SetFocusHighlightEnabled(true);
CreateDetailedMenu();
ASSERT_TRUE(highlight_keyboard_focus_top_view());
EXPECT_TRUE(IsSwitchToggled(highlight_keyboard_focus_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(highlight_keyboard_focus_top_view()));
ClickView(highlight_keyboard_focus_top_view());
EXPECT_FALSE(IsSwitchToggled(highlight_keyboard_focus_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(highlight_keyboard_focus_top_view()));
EXPECT_FALSE(controller()->focus_highlight().enabled());
}
TEST_F(AccessibilityDetailedViewTest, StickyKeysTopView) {
EnableStickyKeys(true);
CreateDetailedMenu();
ASSERT_TRUE(sticky_keys_top_view());
EXPECT_TRUE(IsSwitchToggled(sticky_keys_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(sticky_keys_top_view()));
ClickView(sticky_keys_top_view());
EXPECT_FALSE(IsSwitchToggled(sticky_keys_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(sticky_keys_top_view()));
EXPECT_FALSE(controller()->sticky_keys().enabled());
}
TEST_F(AccessibilityDetailedViewTest, SwitchAccessTopView) {
controller()->DisableSwitchAccessDisableConfirmationDialogTesting();
EnableSwitchAccess(true);
CreateDetailedMenu();
ASSERT_TRUE(switch_access_top_view());
EXPECT_TRUE(IsSwitchToggled(switch_access_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(switch_access_top_view()));
ClickView(switch_access_top_view());
EXPECT_FALSE(IsSwitchToggled(switch_access_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(switch_access_top_view()));
EXPECT_FALSE(controller()->switch_access().enabled());
}
TEST_F(AccessibilityDetailedViewTest, ColorCorrectionTopView) {
EnableColorCorrection(true);
CreateDetailedMenu();
ASSERT_TRUE(color_correction_top_view());
EXPECT_TRUE(IsSwitchToggled(color_correction_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(color_correction_top_view()));
ClickView(color_correction_top_view());
EXPECT_FALSE(IsSwitchToggled(color_correction_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(color_correction_top_view()));
EXPECT_FALSE(controller()->color_correction().enabled());
}
TEST_F(AccessibilityDetailedViewTest, CheckMenuVisibilityOnDetailMenu) {
CreateDetailedMenu();
EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakShownOnDetailMenu());
EXPECT_TRUE(IsDictationShownOnDetailMenu());
EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierShownOnDetailMenu());
EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu());
EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu());
EXPECT_TRUE(IsHelpAvailableOnDetailMenu());
EXPECT_TRUE(IsSettingsAvailableOnDetailMenu());
EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsLiveCaptionShownOnDetailMenu());
EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu());
EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu());
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
BlockUserSession(BLOCKED_BY_LOCK_SCREEN);
CreateDetailedMenu();
EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakShownOnDetailMenu());
EXPECT_TRUE(IsDictationShownOnDetailMenu());
EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierShownOnDetailMenu());
EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu());
EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu());
EXPECT_FALSE(IsHelpAvailableOnDetailMenu());
EXPECT_FALSE(IsSettingsAvailableOnDetailMenu());
EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsLiveCaptionShownOnDetailMenu());
EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu());
EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu());
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
UnblockUserSession();
BlockUserSession(BLOCKED_BY_USER_ADDING_SCREEN);
CreateDetailedMenu();
EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakShownOnDetailMenu());
EXPECT_TRUE(IsDictationShownOnDetailMenu());
EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierShownOnDetailMenu());
EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu());
EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu());
EXPECT_FALSE(IsHelpAvailableOnDetailMenu());
EXPECT_FALSE(IsSettingsAvailableOnDetailMenu());
EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsLiveCaptionShownOnDetailMenu());
EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu());
EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu());
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
UnblockUserSession();
}
TEST_F(AccessibilityDetailedViewTest, ClickDetailMenu) {
AccessibilityController* accessibility_controller =
Shell::Get()->accessibility_controller();
EXPECT_FALSE(accessibility_controller->spoken_feedback().enabled());
CreateDetailedMenu();
ClickSpokenFeedbackOnDetailMenu();
EXPECT_TRUE(accessibility_controller->spoken_feedback().enabled());
CreateDetailedMenu();
ClickSpokenFeedbackOnDetailMenu();
EXPECT_FALSE(accessibility_controller->spoken_feedback().enabled());
EXPECT_FALSE(accessibility_controller->high_contrast().enabled());
CreateDetailedMenu();
ClickHighContrastOnDetailMenu();
EXPECT_TRUE(accessibility_controller->high_contrast().enabled());
CreateDetailedMenu();
ClickHighContrastOnDetailMenu();
EXPECT_FALSE(accessibility_controller->high_contrast().enabled());
EXPECT_FALSE(Shell::Get()->accessibility_delegate()->IsMagnifierEnabled());
CreateDetailedMenu();
ClickScreenMagnifierOnDetailMenu();
EXPECT_TRUE(Shell::Get()->accessibility_delegate()->IsMagnifierEnabled());
CreateDetailedMenu();
ClickScreenMagnifierOnDetailMenu();
EXPECT_FALSE(Shell::Get()->accessibility_delegate()->IsMagnifierEnabled());
EXPECT_FALSE(Shell::Get()->docked_magnifier_controller()->GetEnabled());
CreateDetailedMenu();
ClickDockedMagnifierOnDetailMenu();
EXPECT_TRUE(Shell::Get()->docked_magnifier_controller()->GetEnabled());
CreateDetailedMenu();
ClickDockedMagnifierOnDetailMenu();
EXPECT_FALSE(Shell::Get()->docked_magnifier_controller()->GetEnabled());
EXPECT_FALSE(accessibility_controller->autoclick().enabled());
CreateDetailedMenu();
ClickAutoclickOnDetailMenu();
EXPECT_TRUE(accessibility_controller->autoclick().enabled());
CreateDetailedMenu();
ClickAutoclickOnDetailMenu();
EXPECT_FALSE(accessibility_controller->autoclick().enabled());
EXPECT_FALSE(accessibility_controller->virtual_keyboard().enabled());
CreateDetailedMenu();
ClickVirtualKeyboardOnDetailMenu();
EXPECT_TRUE(accessibility_controller->virtual_keyboard().enabled());
CreateDetailedMenu();
ClickVirtualKeyboardOnDetailMenu();
EXPECT_FALSE(accessibility_controller->virtual_keyboard().enabled());
EXPECT_FALSE(accessibility_controller->large_cursor().enabled());
CreateDetailedMenu();
ClickLargeMouseCursorOnDetailMenu();
EXPECT_TRUE(accessibility_controller->large_cursor().enabled());
CreateDetailedMenu();
ClickLargeMouseCursorOnDetailMenu();
EXPECT_FALSE(accessibility_controller->large_cursor().enabled());
EXPECT_FALSE(accessibility_controller->live_caption().enabled());
CreateDetailedMenu();
ClickLiveCaptionOnDetailMenu();
EXPECT_TRUE(accessibility_controller->live_caption().enabled());
CreateDetailedMenu();
ClickLiveCaptionOnDetailMenu();
EXPECT_FALSE(accessibility_controller->live_caption().enabled());
EXPECT_FALSE(accessibility_controller->mono_audio().enabled());
CreateDetailedMenu();
ClickMonoAudioOnDetailMenu();
EXPECT_TRUE(accessibility_controller->mono_audio().enabled());
CreateDetailedMenu();
ClickMonoAudioOnDetailMenu();
EXPECT_FALSE(accessibility_controller->mono_audio().enabled());
EXPECT_FALSE(accessibility_controller->caret_highlight().enabled());
CreateDetailedMenu();
ClickCaretHighlightOnDetailMenu();
EXPECT_TRUE(accessibility_controller->caret_highlight().enabled());
CreateDetailedMenu();
ClickCaretHighlightOnDetailMenu();
EXPECT_FALSE(accessibility_controller->caret_highlight().enabled());
EXPECT_FALSE(accessibility_controller->cursor_highlight().enabled());
CreateDetailedMenu();
ClickHighlightMouseCursorOnDetailMenu();
EXPECT_TRUE(accessibility_controller->cursor_highlight().enabled());
CreateDetailedMenu();
ClickHighlightMouseCursorOnDetailMenu();
EXPECT_FALSE(accessibility_controller->cursor_highlight().enabled());
EXPECT_FALSE(accessibility_controller->focus_highlight().enabled());
CreateDetailedMenu();
ClickHighlightKeyboardFocusOnDetailMenu();
EXPECT_TRUE(accessibility_controller->focus_highlight().enabled());
CreateDetailedMenu();
ClickHighlightKeyboardFocusOnDetailMenu();
EXPECT_FALSE(accessibility_controller->focus_highlight().enabled());
EXPECT_FALSE(accessibility_controller->sticky_keys().enabled());
CreateDetailedMenu();
ClickStickyKeysOnDetailMenu();
EXPECT_TRUE(accessibility_controller->sticky_keys().enabled());
CreateDetailedMenu();
ClickStickyKeysOnDetailMenu();
EXPECT_FALSE(accessibility_controller->sticky_keys().enabled());
EXPECT_FALSE(accessibility_controller->switch_access().enabled());
CreateDetailedMenu();
ClickSwitchAccessOnDetailMenu();
EXPECT_TRUE(accessibility_controller->switch_access().enabled());
CreateDetailedMenu();
ClickSwitchAccessOnDetailMenu();
EXPECT_FALSE(accessibility_controller->switch_access().enabled());
EXPECT_FALSE(accessibility_controller->select_to_speak().enabled());
CreateDetailedMenu();
ClickSelectToSpeakOnDetailMenu();
EXPECT_TRUE(accessibility_controller->select_to_speak().enabled());
CreateDetailedMenu();
ClickSelectToSpeakOnDetailMenu();
EXPECT_FALSE(accessibility_controller->select_to_speak().enabled());
EXPECT_FALSE(accessibility_controller->dictation().enabled());
CreateDetailedMenu();
ClickDictationOnDetailMenu();
EXPECT_TRUE(accessibility_controller->dictation().enabled());
CreateDetailedMenu();
ClickDictationOnDetailMenu();
EXPECT_FALSE(accessibility_controller->dictation().enabled());
EXPECT_FALSE(accessibility_controller->color_correction().enabled());
CreateDetailedMenu();
ClickColorCorrectionOnDetailMenu();
EXPECT_TRUE(accessibility_controller->color_correction().enabled());
CreateDetailedMenu();
ClickColorCorrectionOnDetailMenu();
EXPECT_FALSE(accessibility_controller->color_correction().enabled());
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());
}
TEST_F(AccessibilityDetailedViewTest, KioskModeShowsReducedAnimations) {
SetUpKioskSession();
CreateDetailedMenu();
EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakShownOnDetailMenu());
EXPECT_TRUE(IsDictationShownOnDetailMenu());
EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierShownOnDetailMenu());
EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu());
EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu());
EXPECT_TRUE(IsHelpAvailableOnDetailMenu());
EXPECT_TRUE(IsSettingsAvailableOnDetailMenu());
EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsLiveCaptionShownOnDetailMenu());
EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu());
EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu());
EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessShownOnDetailMenu());
EXPECT_TRUE(IsColorCorrectionShownOnDetailMenu());
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
EXPECT_TRUE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewTest, KioskModeReducedAnimationsView) {
SetUpKioskSession();
EnableReducedAnimations(true);
CreateDetailedMenu();
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());
ASSERT_TRUE(IsReducedAnimationsShownOnDetailMenu());
EXPECT_TRUE(IsReducedAnimationsEnabledOnDetailMenu());
CloseDetailMenu();
EnableReducedAnimations(false);
CreateDetailedMenu();
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());
ASSERT_TRUE(IsReducedAnimationsShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsEnabledOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewTest, KioskModeReducedAnimationsTopView) {
SetUpKioskSession();
EnableReducedAnimations(true);
CreateDetailedMenu();
ASSERT_TRUE(reduced_animations_top_view());
EXPECT_TRUE(IsSwitchToggled(reduced_animations_top_view()));
EXPECT_TRUE(IsCheckedForAccessibility(reduced_animations_top_view()));
ClickView(reduced_animations_top_view());
EXPECT_FALSE(IsSwitchToggled(reduced_animations_top_view()));
EXPECT_FALSE(IsCheckedForAccessibility(reduced_animations_top_view()));
EXPECT_FALSE(controller()->reduced_animations().enabled());
}
TEST_F(AccessibilityDetailedViewTest, KioskModeClickReducedAnimations) {
SetUpKioskSession();
AccessibilityController* accessibility_controller =
Shell::Get()->accessibility_controller();
EXPECT_FALSE(accessibility_controller->reduced_animations().enabled());
CreateDetailedMenu();
ClickReducedAnimationsOnDetailMenu();
EXPECT_TRUE(accessibility_controller->reduced_animations().enabled());
CreateDetailedMenu();
ClickReducedAnimationsOnDetailMenu();
EXPECT_FALSE(accessibility_controller->reduced_animations().enabled());
}
TEST_F(AccessibilityDetailedViewTest, FaceGazeKiosk) {
SetUpKioskSession();
CreateDetailedMenu();
EXPECT_TRUE(IsFaceGazeShownOnDetailMenu());
}
TEST_F(AccessibilityDetailedViewTest, FaceGazeEnterpriseKiosk) {
Shell::Get()
->system_tray_model()
->enterprise_domain()
->SetDeviceEnterpriseInfo(DeviceEnterpriseInfo(
"info", ManagementDeviceMode::kChromeEnterprise));
SetUpKioskSession();
CreateDetailedMenu();
EXPECT_FALSE(IsFaceGazeShownOnDetailMenu());
}
class AccessibilityDetailedViewSodaTest
: public AccessibilityDetailedViewTest,
public testing::WithParamInterface<SodaFeature> {
public:
AccessibilityDetailedViewSodaTest() { set_start_session(false); }
AccessibilityDetailedViewSodaTest(const AccessibilityDetailedViewSodaTest&) =
delete;
AccessibilityDetailedViewSodaTest& operator=(
const AccessibilityDetailedViewSodaTest&) = delete;
~AccessibilityDetailedViewSodaTest() override = default;
void SetUp() override {
AccessibilityDetailedViewTest::SetUp();
std::vector<base::test::FeatureRef> enabled_features(
{ash::features::kOnDeviceSpeechRecognition});
scoped_feature_list_.InitWithFeatures(enabled_features, {});
soda_installer_impl_ =
std::make_unique<speech::SodaInstallerImplChromeOS>();
CreateDetailedMenu();
EnableFeature(true);
SetFeatureViewSubtitleText(kInitialFeatureViewSubtitleText);
SetFeatureLocale("en-US");
}
void TearDown() override {
soda_installer_impl_.reset();
AccessibilityDetailedViewTest::TearDown();
}
void EnableFeature(bool enabled) {
switch (GetParam()) {
case SodaFeature::kDictation:
EnableDictation(enabled);
break;
case SodaFeature::kLiveCaption:
EnableLiveCaption(enabled);
break;
}
}
void SetFeatureLocale(const std::string& locale) {
switch (GetParam()) {
case SodaFeature::kDictation:
Shell::Get()->session_controller()->GetActivePrefService()->SetString(
prefs::kAccessibilityDictationLocale, locale);
break;
case SodaFeature::kLiveCaption:
Shell::Get()->session_controller()->GetActivePrefService()->SetString(
::prefs::kLiveCaptionLanguageCode, locale);
break;
}
}
speech::SodaInstaller* soda_installer() {
return speech::SodaInstaller::GetInstance();
}
void SetFeatureViewSubtitleText(std::u16string text) {
switch (GetParam()) {
case SodaFeature::kDictation:
detailed_menu()->dictation_view_->SetSubText(text);
break;
case SodaFeature::kLiveCaption:
detailed_menu()->live_caption_view_->SetSubText(text);
break;
}
}
std::u16string_view GetFeatureViewSubtitleText() {
switch (GetParam()) {
case SodaFeature::kDictation:
return detailed_menu()->dictation_view_->sub_text_label()->GetText();
case SodaFeature::kLiveCaption:
return detailed_menu()->live_caption_view_->sub_text_label()->GetText();
}
}
private:
std::unique_ptr<speech::SodaInstallerImplChromeOS> soda_installer_impl_;
base::test::ScopedFeatureList scoped_feature_list_;
};
INSTANTIATE_TEST_SUITE_P(All,
AccessibilityDetailedViewSodaTest,
::testing::Values(SodaFeature::kDictation,
SodaFeature::kLiveCaption));
TEST_P(AccessibilityDetailedViewSodaTest, OnSodaInstalledNotification) {
SetFeatureLocale("fr-FR");
soda_installer()->NotifySodaInstalledForTesting();
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaInstalledForTesting(en_us());
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaInstalledForTesting(fr_fr());
EXPECT_EQ(kSodaDownloaded, GetFeatureViewSubtitleText());
}
TEST_P(AccessibilityDetailedViewSodaTest, OnSodaProgressNotification) {
SetFeatureLocale("en-US");
soda_installer()->NotifySodaProgressForTesting(75, fr_fr());
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaProgressForTesting(50);
EXPECT_EQ(kSodaInProgress50, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaProgressForTesting(25, en_us());
EXPECT_EQ(kSodaInProgress25, GetFeatureViewSubtitleText());
}
TEST_P(AccessibilityDetailedViewSodaTest, SodaBinaryErrorNotification) {
soda_installer()->NotifySodaErrorForTesting();
EXPECT_EQ(kSodaFailed, GetFeatureViewSubtitleText());
}
TEST_P(AccessibilityDetailedViewSodaTest, SodaLanguageErrorNotification) {
SetFeatureLocale("en-US");
soda_installer()->NotifySodaErrorForTesting(fr_fr());
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaErrorForTesting(en_us());
EXPECT_EQ(kSodaFailed, GetFeatureViewSubtitleText());
}
TEST_P(AccessibilityDetailedViewSodaTest, SodaDownloadFeatureDisabled) {
EnableFeature(false);
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaErrorForTesting();
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaInstalledForTesting();
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
soda_installer()->NotifySodaProgressForTesting(50);
EXPECT_EQ(kInitialFeatureViewSubtitleText, GetFeatureViewSubtitleText());
}
class AccessibilityDetailedViewLoginScreenTest
: public AccessibilityDetailedViewTest {
public:
AccessibilityDetailedViewLoginScreenTest(
const AccessibilityDetailedViewLoginScreenTest&) = delete;
AccessibilityDetailedViewLoginScreenTest& operator=(
const AccessibilityDetailedViewLoginScreenTest&) = delete;
protected:
AccessibilityDetailedViewLoginScreenTest() { set_start_session(false); }
~AccessibilityDetailedViewLoginScreenTest() override = default;
};
TEST_F(AccessibilityDetailedViewLoginScreenTest, NothingCheckedByDefault) {
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, SpokenFeedback) {
EnableSpokenFeedback(true);
CreateDetailedMenu();
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableSpokenFeedback(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest,
SpokenFeedbackConflictingFeatures) {
EnableStickyKeys(true);
SetFocusHighlightEnabled(true);
CreateDetailedMenu();
EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
CloseDetailMenu();
EnableSpokenFeedback(true);
CreateDetailedMenu();
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
CloseDetailMenu();
EnableSpokenFeedback(false);
CreateDetailedMenu();
EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, SelectToSpeak) {
EnableSelectToSpeak(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableSelectToSpeak(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, Dictation) {
EnableDictation(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableDictation(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, HighContrast) {
EnableHighContrast(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableHighContrast(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, FullScreenMagnifier) {
SetScreenMagnifierEnabled(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
SetScreenMagnifierEnabled(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, DockedMagnifier) {
SetDockedMagnifierEnabled(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
SetDockedMagnifierEnabled(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, LargeCursor) {
EnableLargeCursor(true);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
EXPECT_FALSE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_FALSE(IsDockedMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableLargeCursor(false);
CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_FALSE(IsDictationEnabledOnDetailMenu());
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, LiveCaption) {
EnableLiveCaption(true);
CreateDetailedMenu();
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_TRUE(IsLiveCaptionEnabledOnDetailMenu());
EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu());
EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableLiveCaption(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, VirtualKeyboard) {
EnableVirtualKeyboard(true);
CreateDetailedMenu();
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_TRUE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableVirtualKeyboard(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, MonoAudio) {
EnableMonoAudio(true);
CreateDetailedMenu();
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_TRUE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableMonoAudio(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, CaretHighlight) {
SetCaretHighlightEnabled(true);
CreateDetailedMenu();
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_TRUE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
SetCaretHighlightEnabled(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, CursorHighlight) {
SetCursorHighlightEnabled(true);
CreateDetailedMenu();
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_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
SetCursorHighlightEnabled(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, FocusHighlight) {
SetFocusHighlightEnabled(true);
CreateDetailedMenu();
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_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
SetFocusHighlightEnabled(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, StickyKeys) {
EnableStickyKeys(true);
CreateDetailedMenu();
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_TRUE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableStickyKeys(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, SwitchAccess) {
// Enabling switch access.
EnableSwitchAccess(true);
CreateDetailedMenu();
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());
EXPECT_TRUE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu();
// Disabling switch access.
EnableSwitchAccess(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu();
}
*/
TEST_F(AccessibilityDetailedViewLoginScreenTest, AllFeatures) {
EnableSpokenFeedback(true);
EnableSelectToSpeak(true);
EnableDictation(true);
EnableFaceGaze(true);
EnableHighContrast(true);
SetScreenMagnifierEnabled(true);
SetDockedMagnifierEnabled(true);
EnableLargeCursor(true);
EnableLiveCaption(true);
EnableVirtualKeyboard(true);
EnableAutoclick(true);
EnableMonoAudio(true);
SetCaretHighlightEnabled(true);
SetCursorHighlightEnabled(true);
SetFocusHighlightEnabled(true);
EnableStickyKeys(true);
EnableSwitchAccess(true);
CreateDetailedMenu();
EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_TRUE(IsSelectToSpeakEnabledOnDetailMenu());
EXPECT_TRUE(IsDictationEnabledOnDetailMenu());
EXPECT_TRUE(IsFaceGazeEnabledOnDetailMenu());
EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu());
EXPECT_TRUE(IsScreenMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(IsDockedMagnifierEnabledOnDetailMenu());
EXPECT_TRUE(IsLargeCursorEnabledOnDetailMenu());
EXPECT_TRUE(IsLiveCaptionEnabledOnDetailMenu());
EXPECT_TRUE(IsAutoclickEnabledOnDetailMenu());
EXPECT_TRUE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_TRUE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_TRUE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_TRUE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu();
EnableSpokenFeedback(false);
EnableSelectToSpeak(false);
EnableDictation(false);
EnableFaceGaze(false);
EnableHighContrast(false);
SetScreenMagnifierEnabled(false);
SetDockedMagnifierEnabled(false);
EnableLargeCursor(false);
EnableLiveCaption(false);
EnableVirtualKeyboard(false);
EnableAutoclick(false);
EnableMonoAudio(false);
SetCaretHighlightEnabled(false);
SetCursorHighlightEnabled(false);
SetFocusHighlightEnabled(false);
EnableStickyKeys(false);
EnableSwitchAccess(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, Autoclick) {
EnableAutoclick(true);
CreateDetailedMenu();
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_TRUE(IsAutoclickEnabledOnDetailMenu());
EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu());
EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu());
EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableAutoclick(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, 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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
EnableFaceGaze(false);
CreateDetailedMenu();
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());
EXPECT_FALSE(IsColorCorrectionShownOnDetailMenu());
EXPECT_FALSE(IsReducedAnimationsShownOnDetailMenu());
CloseDetailMenu();
}
TEST_F(AccessibilityDetailedViewLoginScreenTest, FaceGazeEnterprise) {
Shell::Get()
->system_tray_model()
->enterprise_domain()
->SetDeviceEnterpriseInfo(DeviceEnterpriseInfo(
"info", ManagementDeviceMode::kChromeEnterprise));
CreateDetailedMenu();
EXPECT_FALSE(IsFaceGazeShownOnDetailMenu());
}
}