Commit 9982e8f3 authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

[Switch Access] Prevent repeated crash after enable on login screen

A bug was recently found where enabling Switch Access on the login
screen leads to a series of crashes. This is a short-term fix which
prevents the crash by removing the option to enable Switch Access when
the login state is NOT_LOGGED_IN.

R=katie@chromium.org
TBR=skuhne@chromium.org

AX-Relnotes: n/a.
Bug: 1108808
Change-Id: Ie718cda7aaa8c544b0a0cc49615cd1b802f1d353
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316437
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Reviewed-by: default avatarKatie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791355}
parent e7f4f005
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "ash/high_contrast/high_contrast_controller.h" #include "ash/high_contrast/high_contrast_controller.h"
#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/keyboard_controller_impl.h"
#include "ash/keyboard/ui/keyboard_util.h" #include "ash/keyboard/ui/keyboard_util.h"
#include "ash/login_status.h"
#include "ash/policy/policy_recommendation_restorer.h" #include "ash/policy/policy_recommendation_restorer.h"
#include "ash/public/cpp/accessibility_controller_client.h" #include "ash/public/cpp/accessibility_controller_client.h"
#include "ash/public/cpp/ash_constants.h" #include "ash/public/cpp/ash_constants.h"
...@@ -1121,6 +1122,13 @@ bool AccessibilityControllerImpl::IsSwitchAccessRunning() const { ...@@ -1121,6 +1122,13 @@ bool AccessibilityControllerImpl::IsSwitchAccessRunning() const {
} }
bool AccessibilityControllerImpl::IsSwitchAccessSettingVisibleInTray() { bool AccessibilityControllerImpl::IsSwitchAccessSettingVisibleInTray() {
// Switch Access cannot be enabled on the sign-in page until crbug/1108808 has
// been fully resolved.
if (!switch_access().enabled() &&
Shell::Get()->session_controller()->login_status() ==
ash::LoginStatus::NOT_LOGGED_IN) {
return false;
}
return switch_access().IsVisibleInTray(); return switch_access().IsVisibleInTray();
return IsEnterpriseIconVisibleInTrayMenu( return IsEnterpriseIconVisibleInTrayMenu(
prefs::kAccessibilitySwitchAccessEnabled); prefs::kAccessibilitySwitchAccessEnabled);
......
...@@ -653,7 +653,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -653,7 +653,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling spoken feedback. // Enabling spoken feedback.
...@@ -673,7 +675,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -673,7 +675,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling spoken feedback. // Disabling spoken feedback.
...@@ -693,7 +697,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -693,7 +697,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling select to speak. // Enabling select to speak.
...@@ -713,7 +719,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -713,7 +719,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling select to speak. // Disabling select to speak.
...@@ -733,7 +741,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -733,7 +741,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling dictation. // Enabling dictation.
...@@ -753,7 +763,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -753,7 +763,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling dictation. // Disabling dictation.
...@@ -773,7 +785,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -773,7 +785,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling high contrast. // Enabling high contrast.
...@@ -793,7 +807,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -793,7 +807,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling high contrast. // Disabling high contrast.
...@@ -813,7 +829,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -813,7 +829,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling full screen magnifier. // Enabling full screen magnifier.
...@@ -833,7 +851,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -833,7 +851,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling screen magnifier. // Disabling screen magnifier.
...@@ -853,7 +873,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -853,7 +873,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling docked magnifier. // Enabling docked magnifier.
...@@ -873,7 +895,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -873,7 +895,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling docked magnifier. // Disabling docked magnifier.
...@@ -893,7 +917,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -893,7 +917,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling large cursor. // Enabling large cursor.
...@@ -913,7 +939,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -913,7 +939,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling large cursor. // Disabling large cursor.
...@@ -933,7 +961,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -933,7 +961,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enable on-screen keyboard. // Enable on-screen keyboard.
...@@ -953,7 +983,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -953,7 +983,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disable on-screen keyboard. // Disable on-screen keyboard.
...@@ -973,7 +1005,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -973,7 +1005,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling mono audio. // Enabling mono audio.
...@@ -993,7 +1027,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -993,7 +1027,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling mono audio. // Disabling mono audio.
...@@ -1013,7 +1049,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1013,7 +1049,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling caret highlight. // Enabling caret highlight.
...@@ -1033,7 +1071,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1033,7 +1071,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling caret highlight. // Disabling caret highlight.
...@@ -1053,7 +1093,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1053,7 +1093,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling highlight mouse cursor. // Enabling highlight mouse cursor.
...@@ -1073,7 +1115,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1073,7 +1115,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling highlight mouse cursor. // Disabling highlight mouse cursor.
...@@ -1093,7 +1137,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1093,7 +1137,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling highlight keyboard focus. // Enabling highlight keyboard focus.
...@@ -1113,7 +1159,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1113,7 +1159,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling highlight keyboard focus. // Disabling highlight keyboard focus.
...@@ -1133,7 +1181,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1133,7 +1181,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling sticky keys. // Enabling sticky keys.
...@@ -1153,7 +1203,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1153,7 +1203,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling sticky keys. // Disabling sticky keys.
...@@ -1173,10 +1225,14 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1173,10 +1225,14 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling switch access. // Switch Access is currently not available on the login screen; see
// crbug/1108808
/* // Enabling switch access.
EnableSwitchAccess(true); EnableSwitchAccess(true);
CreateDetailedMenu(); CreateDetailedMenu();
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
...@@ -1215,6 +1271,7 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1215,6 +1271,7 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
*/
// Enabling all of the a11y features. // Enabling all of the a11y features.
EnableSpokenFeedback(true); EnableSpokenFeedback(true);
...@@ -1282,7 +1339,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1282,7 +1339,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently cannot be enabled from the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Enabling autoclick. // Enabling autoclick.
...@@ -1302,7 +1361,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1302,7 +1361,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently not available on the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
// Disabling autoclick. // Disabling autoclick.
...@@ -1322,7 +1383,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) { ...@@ -1322,7 +1383,9 @@ TEST_F(TrayAccessibilityLoginScreenTest, CheckMarksOnDetailMenu) {
EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu());
EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu());
EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu());
EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu()); // Switch Access is currently not available on the login screen.
// TODO(crbug.com/1108808): Uncomment once issue is addressed.
// EXPECT_FALSE(IsSwitchAccessEnabledOnDetailMenu());
CloseDetailMenu(); CloseDetailMenu();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment