[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 5 | #include "ash/accessibility_types.h" |
| 6 | #include "ash/login_status.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 7 | #include "ash/magnifier/magnification_controller.h" |
James Cook | c63b9fd | 2017-08-18 18:48:32 | [diff] [blame] | 8 | #include "ash/public/cpp/ash_pref_names.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 9 | #include "ash/shell.h" |
James Cook | 346c8c6 | 2017-07-18 19:38:37 | [diff] [blame] | 10 | #include "ash/shell_test_api.h" |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 11 | #include "ash/system/tray/system_tray.h" |
jamescook | a1b2a09 | 2017-06-08 15:07:55 | [diff] [blame] | 12 | #include "ash/system/tray/system_tray_test_api.h" |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 13 | #include "ash/system/tray_accessibility.h" |
[email protected] | aecb608 | 2013-07-09 14:29:41 | [diff] [blame] | 14 | #include "base/callback.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 15 | #include "base/command_line.h" |
fdoray | ba12142 | 2016-12-23 19:51:48 | [diff] [blame] | 16 | #include "base/memory/ptr_util.h" |
Gabriel Charette | 078e366 | 2017-08-28 22:59:04 | [diff] [blame^] | 17 | #include "base/run_loop.h" |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 18 | #include "base/strings/utf_string_conversions.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 19 | #include "chrome/browser/browser_process.h" |
[email protected] | fdf40f3e | 2013-07-11 23:55:46 | [diff] [blame] | 20 | #include "chrome/browser/chrome_notification_types.h" |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 21 | #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 22 | #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 23 | #include "chrome/browser/chromeos/login/helper.h" |
[email protected] | aa8328fb | 2013-04-19 15:09:06 | [diff] [blame] | 24 | #include "chrome/browser/chromeos/login/startup_utils.h" |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 25 | #include "chrome/browser/chromeos/profiles/profile_helper.h" |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 26 | #include "chrome/browser/extensions/api/braille_display_private/mock_braille_controller.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 27 | #include "chrome/browser/profiles/profile.h" |
| 28 | #include "chrome/browser/profiles/profile_manager.h" |
xiyuan | 233f4e7 | 2017-04-06 06:59:56 | [diff] [blame] | 29 | #include "chrome/browser/ui/ash/session_controller_client.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 30 | #include "chrome/common/chrome_switches.h" |
[email protected] | 0b294be | 2013-08-17 02:18:41 | [diff] [blame] | 31 | #include "chrome/test/base/in_process_browser_test.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 32 | #include "chrome/test/base/testing_profile.h" |
[email protected] | 931d104 | 2013-04-05 17:50:44 | [diff] [blame] | 33 | #include "chromeos/chromeos_switches.h" |
[email protected] | 9727582 | 2014-01-21 19:30:36 | [diff] [blame] | 34 | #include "components/policy/core/browser/browser_policy_connector.h" |
[email protected] | c4a138a | 2013-11-21 19:54:57 | [diff] [blame] | 35 | #include "components/policy/core/common/external_data_fetcher.h" |
[email protected] | f20a3a2 | 2013-12-03 16:12:37 | [diff] [blame] | 36 | #include "components/policy/core/common/mock_configuration_policy_provider.h" |
[email protected] | c4a138a | 2013-11-21 19:54:57 | [diff] [blame] | 37 | #include "components/policy/core/common/policy_map.h" |
| 38 | #include "components/policy/core/common/policy_types.h" |
brettw | 39d6ba4 | 2016-08-24 16:56:38 | [diff] [blame] | 39 | #include "components/policy/policy_constants.h" |
brettw | b1fc1b8 | 2016-02-02 00:19:08 | [diff] [blame] | 40 | #include "components/prefs/pref_service.h" |
xiyuan | 834f3bc | 2016-10-26 19:40:53 | [diff] [blame] | 41 | #include "components/session_manager/core/session_manager.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 42 | #include "content/public/test/test_utils.h" |
| 43 | #include "testing/gtest/include/gtest/gtest.h" |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 44 | #include "ui/message_center/message_center.h" |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 45 | #include "ui/views/controls/button/button.h" |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 46 | #include "ui/views/controls/label.h" |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 47 | #include "ui/views/widget/widget.h" |
| 48 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 49 | using extensions::api::braille_display_private::BrailleObserver; |
| 50 | using extensions::api::braille_display_private::DisplayState; |
| 51 | using extensions::api::braille_display_private::MockBrailleController; |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 52 | using message_center::MessageCenter; |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 53 | using testing::Return; |
| 54 | using testing::_; |
| 55 | using testing::WithParamInterface; |
| 56 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 57 | namespace chromeos { |
| 58 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 59 | enum PrefSettingMechanism { |
| 60 | PREF_SERVICE, |
| 61 | POLICY, |
| 62 | }; |
| 63 | |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 64 | void SetMagnifierEnabled(bool enabled) { |
| 65 | MagnificationManager::Get()->SetMagnifierEnabled(enabled); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 66 | } |
| 67 | |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 68 | // Simulates how UserSessionManager creates and starts a user session. |
| 69 | void CreateAndStartUserSession(const AccountId& account_id) { |
| 70 | using session_manager::SessionManager; |
| 71 | |
| 72 | const std::string user_id_hash = |
| 73 | ProfileHelper::GetUserIdHashByUserIdForTesting(account_id.GetUserEmail()); |
| 74 | |
| 75 | SessionManager::Get()->CreateSession(account_id, user_id_hash); |
| 76 | ProfileHelper::GetProfileByUserIdHashForTest(user_id_hash); |
| 77 | SessionManager::Get()->SessionStarted(); |
| 78 | } |
| 79 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 80 | class TrayAccessibilityTest |
[email protected] | 0b294be | 2013-08-17 02:18:41 | [diff] [blame] | 81 | : public InProcessBrowserTest, |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 82 | public WithParamInterface<PrefSettingMechanism> { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 83 | protected: |
| 84 | TrayAccessibilityTest() {} |
| 85 | virtual ~TrayAccessibilityTest() {} |
[email protected] | 25cf28e | 2013-03-25 19:26:25 | [diff] [blame] | 86 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 87 | // The profile which should be used by these tests. |
[email protected] | 613b3f5 | 2013-12-13 23:37:06 | [diff] [blame] | 88 | Profile* GetProfile() { return ProfileManager::GetActiveUserProfile(); } |
| 89 | |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 90 | void SetUpInProcessBrowserTestFixture() override { |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 91 | EXPECT_CALL(provider_, IsInitializationComplete(_)) |
| 92 | .WillRepeatedly(Return(true)); |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 93 | policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 94 | AccessibilityManager::SetBrailleControllerForTest(&braille_controller_); |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 95 | } |
| 96 | |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 97 | void SetUpCommandLine(base::CommandLine* command_line) override { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 98 | command_line->AppendSwitch(switches::kLoginManager); |
| 99 | command_line->AppendSwitchASCII(switches::kLoginProfile, |
| 100 | TestingProfile::kTestUserProfileDir); |
| 101 | } |
| 102 | |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 103 | void SetUpOnMainThread() override { |
[email protected] | 613b3f5 | 2013-12-13 23:37:06 | [diff] [blame] | 104 | AccessibilityManager::Get()->SetProfileForTest(GetProfile()); |
| 105 | MagnificationManager::Get()->SetProfileForTest(GetProfile()); |
[email protected] | 25cf28e | 2013-03-25 19:26:25 | [diff] [blame] | 106 | // Need to mark oobe completed to show detailed views. |
[email protected] | aa8328fb | 2013-04-19 15:09:06 | [diff] [blame] | 107 | StartupUtils::MarkOobeCompleted(); |
[email protected] | 25cf28e | 2013-03-25 19:26:25 | [diff] [blame] | 108 | } |
| 109 | |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 110 | void TearDownOnMainThread() override { |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 111 | AccessibilityManager::SetBrailleControllerForTest(NULL); |
| 112 | } |
| 113 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 114 | void SetShowAccessibilityOptionsInSystemTrayMenu(bool value) { |
| 115 | if (GetParam() == PREF_SERVICE) { |
[email protected] | 613b3f5 | 2013-12-13 23:37:06 | [diff] [blame] | 116 | PrefService* prefs = GetProfile()->GetPrefs(); |
James Cook | c63b9fd | 2017-08-18 18:48:32 | [diff] [blame] | 117 | prefs->SetBoolean(ash::prefs::kShouldAlwaysShowAccessibilityMenu, value); |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 118 | } else if (GetParam() == POLICY) { |
| 119 | policy::PolicyMap policy_map; |
| 120 | policy_map.Set(policy::key::kShowAccessibilityOptionsInSystemTrayMenu, |
dcheng | 3b344bc2 | 2016-05-10 02:26:09 | [diff] [blame] | 121 | policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
fhorschig | 64834b71 | 2015-09-21 14:20:23 | [diff] [blame] | 122 | policy::POLICY_SOURCE_CLOUD, |
jdoerrie | 23972357 | 2017-03-02 12:09:19 | [diff] [blame] | 123 | base::MakeUnique<base::Value>(value), nullptr); |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 124 | provider_.UpdateChromePolicy(policy_map); |
| 125 | base::RunLoop().RunUntilIdle(); |
| 126 | } else { |
| 127 | FAIL() << "Unknown test parameterization"; |
| 128 | } |
| 129 | } |
| 130 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 131 | ash::TrayAccessibility* tray() { |
jamescook | a1b2a09 | 2017-06-08 15:07:55 | [diff] [blame] | 132 | return const_cast<ash::TrayAccessibility*>( |
| 133 | const_cast<const TrayAccessibilityTest*>(this)->tray()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 134 | } |
| 135 | |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 136 | const ash::TrayAccessibility* tray() const { |
jamescook | a1b2a09 | 2017-06-08 15:07:55 | [diff] [blame] | 137 | return ash::SystemTrayTestApi(ash::Shell::Get()->GetPrimarySystemTray()) |
| 138 | .tray_accessibility(); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 139 | } |
| 140 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 141 | bool IsTrayIconVisible() const { return tray()->tray_icon_visible_; } |
| 142 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 143 | views::View* CreateMenuItem() { |
| 144 | return tray()->CreateDefaultView(GetLoginStatus()); |
| 145 | } |
| 146 | |
Evan Stade | e70b0a6 | 2017-06-05 20:42:30 | [diff] [blame] | 147 | void DestroyMenuItem() { return tray()->OnDefaultViewDestroyed(); } |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 148 | |
| 149 | bool CanCreateMenuItem() { |
| 150 | views::View* menu_item_view = CreateMenuItem(); |
| 151 | DestroyMenuItem(); |
| 152 | return menu_item_view != NULL; |
| 153 | } |
| 154 | |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 155 | void SetLoginStatus(ash::LoginStatus status) { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 156 | tray()->UpdateAfterLoginStatusChange(status); |
| 157 | } |
| 158 | |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 159 | ash::LoginStatus GetLoginStatus() { return tray()->login_; } |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 160 | |
| 161 | bool CreateDetailedMenu() { |
estade | b0df165 | 2017-03-22 22:41:10 | [diff] [blame] | 162 | tray()->ShowDetailedView(0, false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 163 | return tray()->detailed_menu_ != NULL; |
| 164 | } |
| 165 | |
| 166 | void CloseDetailMenu() { |
Evan Stade | e70b0a6 | 2017-06-05 20:42:30 | [diff] [blame] | 167 | ASSERT_TRUE(tray()->detailed_menu_); |
| 168 | tray()->OnDetailedViewDestroyed(); |
| 169 | EXPECT_FALSE(tray()->detailed_menu_); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | void ClickSpokenFeedbackOnDetailMenu() { |
| 173 | views::View* button = tray()->detailed_menu_->spoken_feedback_view_; |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 174 | ASSERT_TRUE(button); |
[email protected] | acd0fd7a | 2013-03-04 22:00:53 | [diff] [blame] | 175 | tray()->detailed_menu_->OnViewClicked(button); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | void ClickHighContrastOnDetailMenu() { |
| 179 | views::View* button = tray()->detailed_menu_->high_contrast_view_; |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 180 | ASSERT_TRUE(button); |
[email protected] | acd0fd7a | 2013-03-04 22:00:53 | [diff] [blame] | 181 | tray()->detailed_menu_->OnViewClicked(button); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | void ClickScreenMagnifierOnDetailMenu() { |
| 185 | views::View* button = tray()->detailed_menu_->screen_magnifier_view_; |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 186 | ASSERT_TRUE(button); |
[email protected] | acd0fd7a | 2013-03-04 22:00:53 | [diff] [blame] | 187 | tray()->detailed_menu_->OnViewClicked(button); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 188 | } |
| 189 | |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 190 | void ClickAutoclickOnDetailMenu() { |
| 191 | views::View* button = tray()->detailed_menu_->autoclick_view_; |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 192 | ASSERT_TRUE(button); |
| 193 | tray()->detailed_menu_->OnViewClicked(button); |
| 194 | } |
| 195 | |
| 196 | void ClickVirtualKeyboardOnDetailMenu() { |
| 197 | views::View* button = tray()->detailed_menu_->virtual_keyboard_view_; |
| 198 | ASSERT_TRUE(button); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 199 | tray()->detailed_menu_->OnViewClicked(button); |
| 200 | } |
| 201 | |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 202 | void ClickLargeMouseCursorOnDetailMenu() { |
| 203 | views::View* button = tray()->detailed_menu_->large_cursor_view_; |
| 204 | ASSERT_TRUE(button); |
| 205 | tray()->detailed_menu_->OnViewClicked(button); |
| 206 | } |
| 207 | |
| 208 | void ClickMonoAudioOnDetailMenu() { |
| 209 | views::View* button = tray()->detailed_menu_->mono_audio_view_; |
| 210 | ASSERT_TRUE(button); |
| 211 | tray()->detailed_menu_->OnViewClicked(button); |
| 212 | } |
| 213 | |
| 214 | void ClickCaretHighlightOnDetailMenu() { |
| 215 | views::View* button = tray()->detailed_menu_->caret_highlight_view_; |
| 216 | ASSERT_TRUE(button); |
| 217 | tray()->detailed_menu_->OnViewClicked(button); |
| 218 | } |
| 219 | |
| 220 | void ClickHighlightMouseCursorOnDetailMenu() { |
| 221 | views::View* button = tray()->detailed_menu_->highlight_mouse_cursor_view_; |
| 222 | ASSERT_TRUE(button); |
| 223 | tray()->detailed_menu_->OnViewClicked(button); |
| 224 | } |
| 225 | |
| 226 | void ClickHighlishtKeyboardFocusOnDetailMenu() { |
| 227 | views::View* button = |
| 228 | tray()->detailed_menu_->highlight_keyboard_focus_view_; |
| 229 | ASSERT_TRUE(button); |
| 230 | tray()->detailed_menu_->OnViewClicked(button); |
| 231 | } |
| 232 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 233 | void ClickStickyKeysOnDetailMenu() { |
| 234 | views::View* button = tray()->detailed_menu_->sticky_keys_view_; |
| 235 | ASSERT_TRUE(button); |
| 236 | tray()->detailed_menu_->OnViewClicked(button); |
| 237 | } |
| 238 | |
| 239 | void ClickTapDraggingOnDetailMenu() { |
| 240 | views::View* button = tray()->detailed_menu_->tap_dragging_view_; |
| 241 | ASSERT_TRUE(button); |
| 242 | tray()->detailed_menu_->OnViewClicked(button); |
| 243 | } |
| 244 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 245 | bool IsSpokenFeedbackEnabledOnDetailMenu() const { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 246 | return tray()->detailed_menu_->spoken_feedback_enabled_; |
| 247 | } |
| 248 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 249 | bool IsHighContrastEnabledOnDetailMenu() const { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 250 | return tray()->detailed_menu_->high_contrast_enabled_; |
| 251 | } |
| 252 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 253 | bool IsScreenMagnifierEnabledOnDetailMenu() const { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 254 | return tray()->detailed_menu_->screen_magnifier_enabled_; |
| 255 | } |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 256 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 257 | bool IsLargeCursorEnabledOnDetailMenu() const { |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 258 | return tray()->detailed_menu_->large_cursor_enabled_; |
| 259 | } |
| 260 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 261 | bool IsAutoclickEnabledOnDetailMenu() const { |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 262 | return tray()->detailed_menu_->autoclick_enabled_; |
| 263 | } |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 264 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 265 | bool IsVirtualKeyboardEnabledOnDetailMenu() const { |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 266 | return tray()->detailed_menu_->virtual_keyboard_enabled_; |
| 267 | } |
| 268 | |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 269 | bool IsMonoAudioEnabledOnDetailMenu() const { |
| 270 | return tray()->detailed_menu_->mono_audio_enabled_; |
| 271 | } |
| 272 | |
| 273 | bool IsCaretHighlightEnabledOnDetailMenu() const { |
| 274 | return tray()->detailed_menu_->caret_highlight_enabled_; |
| 275 | } |
| 276 | |
| 277 | bool IsHighlightMouseCursorEnabledOnDetailMenu() const { |
| 278 | return tray()->detailed_menu_->highlight_mouse_cursor_enabled_; |
| 279 | } |
| 280 | |
| 281 | bool IsHighlightKeyboardFocusEnabledOnDetailMenu() const { |
| 282 | return tray()->detailed_menu_->highlight_keyboard_focus_enabled_; |
| 283 | } |
| 284 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 285 | bool IsStickyKeysEnabledOnDetailMenu() const { |
| 286 | return tray()->detailed_menu_->sticky_keys_enabled_; |
| 287 | } |
| 288 | |
| 289 | bool IsTapDraggingEnabledOnDetailMenu() const { |
| 290 | return tray()->detailed_menu_->tap_dragging_enabled_; |
| 291 | } |
| 292 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 293 | bool IsSpokenFeedbackMenuShownOnDetailMenu() const { |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 294 | return tray()->detailed_menu_->spoken_feedback_view_; |
| 295 | } |
| 296 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 297 | bool IsHighContrastMenuShownOnDetailMenu() const { |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 298 | return tray()->detailed_menu_->high_contrast_view_; |
| 299 | } |
| 300 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 301 | bool IsScreenMagnifierMenuShownOnDetailMenu() const { |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 302 | return tray()->detailed_menu_->screen_magnifier_view_; |
| 303 | } |
| 304 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 305 | bool IsLargeCursorMenuShownOnDetailMenu() const { |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 306 | return tray()->detailed_menu_->large_cursor_view_; |
| 307 | } |
| 308 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 309 | bool IsAutoclickMenuShownOnDetailMenu() const { |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 310 | return tray()->detailed_menu_->autoclick_view_; |
| 311 | } |
| 312 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 313 | bool IsVirtualKeyboardMenuShownOnDetailMenu() const { |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 314 | return tray()->detailed_menu_->virtual_keyboard_view_; |
| 315 | } |
| 316 | |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 317 | bool IsMonoAudioMenuShownOnDetailMenu() const { |
| 318 | return tray()->detailed_menu_->mono_audio_view_; |
| 319 | } |
| 320 | |
| 321 | bool IsCaretHighlightMenuShownOnDetailMenu() const { |
| 322 | return tray()->detailed_menu_->caret_highlight_view_; |
| 323 | } |
| 324 | |
| 325 | bool IsHighlightMouseCursorMenuShownOnDetailMenu() const { |
| 326 | return tray()->detailed_menu_->highlight_mouse_cursor_view_; |
| 327 | } |
| 328 | |
| 329 | bool IsHighlightKeyboardFocusMenuShownOnDetailMenu() const { |
| 330 | return tray()->detailed_menu_->highlight_keyboard_focus_view_; |
| 331 | } |
| 332 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 333 | bool IsStickyKeysMenuShownOnDetailMenu() const { |
| 334 | return tray()->detailed_menu_->sticky_keys_view_; |
| 335 | } |
| 336 | |
| 337 | bool IsTapDraggingMenuShownOnDetailMenu() const { |
| 338 | return tray()->detailed_menu_->tap_dragging_view_; |
| 339 | } |
| 340 | |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 341 | // In material design we show the help button but theme it as disabled if |
mohsen | 6faf4f3 | 2017-02-09 22:09:41 | [diff] [blame] | 342 | // it is not possible to load the help page. |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 343 | bool IsHelpAvailableOnDetailMenu() const { |
mohsen | 6faf4f3 | 2017-02-09 22:09:41 | [diff] [blame] | 344 | return tray()->detailed_menu_->help_view_->state() == |
| 345 | views::Button::STATE_NORMAL; |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 346 | } |
| 347 | |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 348 | // In material design we show the settings button but theme it as disabled if |
mohsen | 6faf4f3 | 2017-02-09 22:09:41 | [diff] [blame] | 349 | // it is not possible to load the settings page. |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 350 | bool IsSettingsAvailableOnDetailMenu() const { |
mohsen | 6faf4f3 | 2017-02-09 22:09:41 | [diff] [blame] | 351 | return tray()->detailed_menu_->settings_view_->state() == |
| 352 | views::Button::STATE_NORMAL; |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 353 | } |
| 354 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 355 | void SetBrailleConnected(bool connected) { |
| 356 | braille_controller_.SetAvailable(connected); |
[email protected] | 2e5e0b1 | 2014-05-07 13:30:20 | [diff] [blame] | 357 | braille_controller_.GetObserver()->OnBrailleDisplayStateChanged( |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 358 | *braille_controller_.GetDisplayState()); |
| 359 | } |
| 360 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 361 | policy::MockConfigurationPolicyProvider provider_; |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 362 | MockBrailleController braille_controller_; |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 363 | }; |
| 364 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 365 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, LoginStatus) { |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 366 | EXPECT_EQ(ash::LoginStatus::NOT_LOGGED_IN, GetLoginStatus()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 367 | |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 368 | CreateAndStartUserSession(AccountId::FromUserEmail("[email protected]")); |
xiyuan | 233f4e7 | 2017-04-06 06:59:56 | [diff] [blame] | 369 | // Flush to ensure the session state reaches ash and updates login status. |
| 370 | SessionControllerClient::FlushForTesting(); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 371 | |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 372 | EXPECT_EQ(ash::LoginStatus::USER, GetLoginStatus()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 373 | } |
| 374 | |
yoshiki | 064fa9e | 2015-09-04 06:32:45 | [diff] [blame] | 375 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowTrayIcon) { |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 376 | SetLoginStatus(ash::LoginStatus::NOT_LOGGED_IN); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 377 | |
| 378 | // Confirms that the icon is invisible before login. |
| 379 | EXPECT_FALSE(IsTrayIconVisible()); |
| 380 | |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 381 | CreateAndStartUserSession(AccountId::FromUserEmail("[email protected]")); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 382 | |
| 383 | // Confirms that the icon is invisible just after login. |
| 384 | EXPECT_FALSE(IsTrayIconVisible()); |
| 385 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 386 | // Toggling spoken feedback changes the visibility of the icon. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 387 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 388 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 389 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 390 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 391 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 392 | EXPECT_FALSE(IsTrayIconVisible()); |
| 393 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 394 | // Toggling high contrast changes the visibility of the icon. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 395 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 396 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 397 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 398 | EXPECT_FALSE(IsTrayIconVisible()); |
| 399 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 400 | // Toggling magnifier changes the visibility of the icon. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 401 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 402 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 403 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 404 | EXPECT_FALSE(IsTrayIconVisible()); |
| 405 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 406 | // Toggling automatic clicks changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 407 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 408 | EXPECT_TRUE(IsTrayIconVisible()); |
| 409 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 410 | EXPECT_FALSE(IsTrayIconVisible()); |
| 411 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 412 | // Toggling the virtual keyboard setting changes the visibility of the a11y |
| 413 | // icon. |
| 414 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 415 | EXPECT_TRUE(IsTrayIconVisible()); |
| 416 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 417 | EXPECT_FALSE(IsTrayIconVisible()); |
| 418 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 419 | // Toggling large cursor changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 420 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 421 | EXPECT_TRUE(IsTrayIconVisible()); |
| 422 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 423 | EXPECT_FALSE(IsTrayIconVisible()); |
| 424 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 425 | // Toggling mono audio changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 426 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 427 | EXPECT_TRUE(IsTrayIconVisible()); |
| 428 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 429 | EXPECT_FALSE(IsTrayIconVisible()); |
| 430 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 431 | // Toggling caret highlight changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 432 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 433 | EXPECT_TRUE(IsTrayIconVisible()); |
| 434 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 435 | EXPECT_FALSE(IsTrayIconVisible()); |
| 436 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 437 | // Toggling highlight mouse cursor changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 438 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 439 | EXPECT_TRUE(IsTrayIconVisible()); |
| 440 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 441 | EXPECT_FALSE(IsTrayIconVisible()); |
| 442 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 443 | // Toggling highlight keyboard focus changes the visibility of the icon. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 444 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 445 | EXPECT_TRUE(IsTrayIconVisible()); |
| 446 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 447 | EXPECT_FALSE(IsTrayIconVisible()); |
| 448 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 449 | // Toggling sticky keys changes the visibility of the icon. |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 450 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 451 | EXPECT_TRUE(IsTrayIconVisible()); |
| 452 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 453 | EXPECT_FALSE(IsTrayIconVisible()); |
| 454 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 455 | // Toggling tap dragging changes the visibility of the icon. |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 456 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 457 | EXPECT_TRUE(IsTrayIconVisible()); |
| 458 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 459 | EXPECT_FALSE(IsTrayIconVisible()); |
| 460 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 461 | // Enabling all accessibility features. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 462 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 463 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 464 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 465 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 466 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 467 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 468 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 469 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 470 | EXPECT_TRUE(IsTrayIconVisible()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 471 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 472 | EXPECT_TRUE(IsTrayIconVisible()); |
| 473 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 474 | EXPECT_TRUE(IsTrayIconVisible()); |
| 475 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 476 | EXPECT_TRUE(IsTrayIconVisible()); |
| 477 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 478 | EXPECT_TRUE(IsTrayIconVisible()); |
| 479 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 480 | EXPECT_TRUE(IsTrayIconVisible()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 481 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 482 | EXPECT_TRUE(IsTrayIconVisible()); |
| 483 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 484 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 485 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 486 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 487 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 488 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 489 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 490 | SetMagnifierEnabled(false); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 491 | EXPECT_TRUE(IsTrayIconVisible()); |
| 492 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 493 | EXPECT_TRUE(IsTrayIconVisible()); |
| 494 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 495 | EXPECT_TRUE(IsTrayIconVisible()); |
| 496 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 497 | EXPECT_TRUE(IsTrayIconVisible()); |
| 498 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 499 | EXPECT_TRUE(IsTrayIconVisible()); |
| 500 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 501 | EXPECT_TRUE(IsTrayIconVisible()); |
| 502 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 503 | EXPECT_TRUE(IsTrayIconVisible()); |
| 504 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 505 | EXPECT_TRUE(IsTrayIconVisible()); |
| 506 | AccessibilityManager::Get()->EnableTapDragging(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 507 | EXPECT_FALSE(IsTrayIconVisible()); |
| 508 | |
James Cook | c63b9fd | 2017-08-18 18:48:32 | [diff] [blame] | 509 | // Confirms that ash::prefs::kShouldAlwaysShowAccessibilityMenu doesn't affect |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 510 | // the icon on the tray. |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 511 | SetShowAccessibilityOptionsInSystemTrayMenu(true); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 512 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 513 | EXPECT_TRUE(IsTrayIconVisible()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 514 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 515 | EXPECT_FALSE(IsTrayIconVisible()); |
| 516 | } |
| 517 | |
yoshiki | 064fa9e | 2015-09-04 06:32:45 | [diff] [blame] | 518 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowMenu) { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 519 | // Login |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 520 | CreateAndStartUserSession(AccountId::FromUserEmail("[email protected]")); |
xiyuan | 233f4e7 | 2017-04-06 06:59:56 | [diff] [blame] | 521 | // Flush to ensure the session state reaches ash and updates login status. |
| 522 | SessionControllerClient::FlushForTesting(); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 523 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 524 | SetShowAccessibilityOptionsInSystemTrayMenu(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 525 | |
| 526 | // Confirms that the menu is hidden. |
| 527 | EXPECT_FALSE(CanCreateMenuItem()); |
| 528 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 529 | // Toggling spoken feedback changes the visibility of the menu. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 530 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 531 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 532 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 533 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 534 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 535 | EXPECT_FALSE(CanCreateMenuItem()); |
| 536 | |
James Cook | fc97f0a | 2017-08-16 20:05:35 | [diff] [blame] | 537 | // Toggling high contrast changes the visibility of the menu. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 538 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 539 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 540 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 541 | EXPECT_FALSE(CanCreateMenuItem()); |
| 542 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 543 | // Toggling screen magnifier changes the visibility of the menu. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 544 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 545 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 546 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 547 | EXPECT_FALSE(CanCreateMenuItem()); |
| 548 | |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 549 | // Toggling autoclick changes the visibility of the menu. |
| 550 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 551 | EXPECT_TRUE(CanCreateMenuItem()); |
| 552 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 553 | EXPECT_FALSE(CanCreateMenuItem()); |
| 554 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 555 | // Toggling virtual keyboard changes the visibility of the menu. |
| 556 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 557 | EXPECT_TRUE(CanCreateMenuItem()); |
| 558 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 559 | EXPECT_FALSE(CanCreateMenuItem()); |
| 560 | |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 561 | // Toggling large mouse cursor changes the visibility of the menu. |
| 562 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 563 | EXPECT_TRUE(CanCreateMenuItem()); |
| 564 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 565 | EXPECT_FALSE(CanCreateMenuItem()); |
| 566 | |
| 567 | // Toggling mono audio changes the visibility of the menu. |
| 568 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 569 | EXPECT_TRUE(CanCreateMenuItem()); |
| 570 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 571 | EXPECT_FALSE(CanCreateMenuItem()); |
| 572 | |
| 573 | // Toggling caret highlight changes the visibility of the menu. |
| 574 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 575 | EXPECT_TRUE(CanCreateMenuItem()); |
| 576 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 577 | EXPECT_FALSE(CanCreateMenuItem()); |
| 578 | |
| 579 | // Toggling highlight mouse cursor changes the visibility of the menu. |
| 580 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 581 | EXPECT_TRUE(CanCreateMenuItem()); |
| 582 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 583 | EXPECT_FALSE(CanCreateMenuItem()); |
| 584 | |
| 585 | // Toggling highlight keyboard focus changes the visibility of the menu. |
| 586 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 587 | EXPECT_TRUE(CanCreateMenuItem()); |
| 588 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 589 | EXPECT_FALSE(CanCreateMenuItem()); |
| 590 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 591 | // Toggling sticky keys changes the visibility of the menu. |
| 592 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 593 | EXPECT_TRUE(CanCreateMenuItem()); |
| 594 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 595 | EXPECT_FALSE(CanCreateMenuItem()); |
| 596 | |
| 597 | // Toggling tap dragging changes the visibility of the menu. |
| 598 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 599 | EXPECT_TRUE(CanCreateMenuItem()); |
| 600 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 601 | EXPECT_FALSE(CanCreateMenuItem()); |
| 602 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 603 | // Enabling all accessibility features. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 604 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 605 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 606 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 607 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 608 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 609 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 610 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 611 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 612 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 613 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 614 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 615 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 616 | EXPECT_TRUE(CanCreateMenuItem()); |
| 617 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 618 | EXPECT_TRUE(CanCreateMenuItem()); |
| 619 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 620 | EXPECT_TRUE(CanCreateMenuItem()); |
| 621 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 622 | EXPECT_TRUE(CanCreateMenuItem()); |
| 623 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 624 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 625 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 626 | EXPECT_TRUE(CanCreateMenuItem()); |
| 627 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 628 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 629 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 630 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 631 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 632 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 633 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 634 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 635 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 636 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 637 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 638 | SetMagnifierEnabled(false); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 639 | EXPECT_TRUE(CanCreateMenuItem()); |
| 640 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 641 | EXPECT_TRUE(CanCreateMenuItem()); |
| 642 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 643 | EXPECT_TRUE(CanCreateMenuItem()); |
| 644 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 645 | EXPECT_TRUE(CanCreateMenuItem()); |
| 646 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 647 | EXPECT_TRUE(CanCreateMenuItem()); |
| 648 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 649 | EXPECT_TRUE(CanCreateMenuItem()); |
| 650 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 651 | EXPECT_TRUE(CanCreateMenuItem()); |
| 652 | AccessibilityManager::Get()->EnableTapDragging(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 653 | EXPECT_FALSE(CanCreateMenuItem()); |
| 654 | } |
| 655 | |
yoshiki | 064fa9e | 2015-09-04 06:32:45 | [diff] [blame] | 656 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowMenuWithShowMenuOption) { |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 657 | // Login |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 658 | CreateAndStartUserSession(AccountId::FromUserEmail("[email protected]")); |
xiyuan | 233f4e7 | 2017-04-06 06:59:56 | [diff] [blame] | 659 | // Flush to ensure the session state reaches ash and updates login status. |
| 660 | SessionControllerClient::FlushForTesting(); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 661 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 662 | SetShowAccessibilityOptionsInSystemTrayMenu(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 663 | |
| 664 | // Confirms that the menu is visible. |
| 665 | EXPECT_TRUE(CanCreateMenuItem()); |
| 666 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 667 | // The menu remains visible regardless of toggling spoken feedback. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 668 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 669 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 670 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 671 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 672 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 673 | EXPECT_TRUE(CanCreateMenuItem()); |
| 674 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 675 | // The menu remains visible regardless of toggling high contrast. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 676 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 677 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 678 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 679 | EXPECT_TRUE(CanCreateMenuItem()); |
| 680 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 681 | // The menu remains visible regardless of toggling screen magnifier. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 682 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 683 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 684 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 685 | EXPECT_TRUE(CanCreateMenuItem()); |
| 686 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 687 | // The menu remains visible regardless of toggling autoclick. |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 688 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 689 | EXPECT_TRUE(CanCreateMenuItem()); |
| 690 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 691 | EXPECT_TRUE(CanCreateMenuItem()); |
| 692 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 693 | // The menu remains visible regardless of toggling on-screen keyboard. |
| 694 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 695 | EXPECT_TRUE(CanCreateMenuItem()); |
| 696 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 697 | EXPECT_TRUE(CanCreateMenuItem()); |
| 698 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 699 | // The menu remains visible regardless of toggling large mouse cursor. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 700 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 701 | EXPECT_TRUE(CanCreateMenuItem()); |
| 702 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 703 | EXPECT_TRUE(CanCreateMenuItem()); |
| 704 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 705 | // The menu remains visible regardless of toggling mono audio. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 706 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 707 | EXPECT_TRUE(CanCreateMenuItem()); |
| 708 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 709 | EXPECT_TRUE(CanCreateMenuItem()); |
| 710 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 711 | // The menu remains visible regardless of toggling caret highlight. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 712 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 713 | EXPECT_TRUE(CanCreateMenuItem()); |
| 714 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 715 | EXPECT_TRUE(CanCreateMenuItem()); |
| 716 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 717 | // The menu remains visible regardless of toggling highlight mouse cursor. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 718 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 719 | EXPECT_TRUE(CanCreateMenuItem()); |
| 720 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 721 | EXPECT_TRUE(CanCreateMenuItem()); |
| 722 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 723 | // The menu remains visible regardless of toggling highlight keyboard focus. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 724 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 725 | EXPECT_TRUE(CanCreateMenuItem()); |
| 726 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 727 | EXPECT_TRUE(CanCreateMenuItem()); |
| 728 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 729 | // The menu remains visible regardless of the toggling sticky keys. |
| 730 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 731 | EXPECT_TRUE(CanCreateMenuItem()); |
| 732 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 733 | EXPECT_TRUE(CanCreateMenuItem()); |
| 734 | |
| 735 | // The menu remains visible regardless of the toggling tap dragging. |
| 736 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 737 | EXPECT_TRUE(CanCreateMenuItem()); |
| 738 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 739 | EXPECT_TRUE(CanCreateMenuItem()); |
| 740 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 741 | // Enabling all accessibility features. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 742 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 743 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 744 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 745 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 746 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 747 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 748 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 749 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 750 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 751 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 752 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 753 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 754 | EXPECT_TRUE(CanCreateMenuItem()); |
| 755 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 756 | EXPECT_TRUE(CanCreateMenuItem()); |
| 757 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 758 | EXPECT_TRUE(CanCreateMenuItem()); |
| 759 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 760 | EXPECT_TRUE(CanCreateMenuItem()); |
| 761 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 762 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 763 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 764 | EXPECT_TRUE(CanCreateMenuItem()); |
| 765 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 766 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 767 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 768 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 769 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 770 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 771 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 772 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 773 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 774 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 775 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 776 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 777 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 778 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 779 | EXPECT_TRUE(CanCreateMenuItem()); |
| 780 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 781 | EXPECT_TRUE(CanCreateMenuItem()); |
| 782 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 783 | EXPECT_TRUE(CanCreateMenuItem()); |
| 784 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 785 | EXPECT_TRUE(CanCreateMenuItem()); |
| 786 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 787 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 788 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 789 | EXPECT_TRUE(CanCreateMenuItem()); |
| 790 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 791 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 792 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 793 | SetShowAccessibilityOptionsInSystemTrayMenu(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 794 | |
| 795 | // Confirms that the menu is invisible. |
| 796 | EXPECT_FALSE(CanCreateMenuItem()); |
| 797 | } |
| 798 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 799 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowMenuWithShowOnLoginScreen) { |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 800 | SetLoginStatus(ash::LoginStatus::NOT_LOGGED_IN); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 801 | |
| 802 | // Confirms that the menu is visible. |
| 803 | EXPECT_TRUE(CanCreateMenuItem()); |
| 804 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 805 | // The menu remains visible regardless of toggling spoken feedback. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 806 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 807 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 808 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 809 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 810 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 811 | EXPECT_TRUE(CanCreateMenuItem()); |
| 812 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 813 | // The menu remains visible regardless of toggling high contrast. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 814 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 815 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 816 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 817 | EXPECT_TRUE(CanCreateMenuItem()); |
| 818 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 819 | // The menu remains visible regardless of toggling screen magnifier. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 820 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 821 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 822 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 823 | EXPECT_TRUE(CanCreateMenuItem()); |
| 824 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 825 | // The menu remains visible regardless of toggling on-screen keyboard. |
| 826 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 827 | EXPECT_TRUE(CanCreateMenuItem()); |
| 828 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 829 | EXPECT_TRUE(CanCreateMenuItem()); |
| 830 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 831 | // The menu remains visible regardless of toggling large mouse cursor. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 832 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 833 | EXPECT_TRUE(CanCreateMenuItem()); |
| 834 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 835 | EXPECT_TRUE(CanCreateMenuItem()); |
| 836 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 837 | // The menu remains visible regardless of toggling mono audio. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 838 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 839 | EXPECT_TRUE(CanCreateMenuItem()); |
| 840 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 841 | EXPECT_TRUE(CanCreateMenuItem()); |
| 842 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 843 | // The menu remains visible regardless of toggling caret highlight. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 844 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 845 | EXPECT_TRUE(CanCreateMenuItem()); |
| 846 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 847 | EXPECT_TRUE(CanCreateMenuItem()); |
| 848 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 849 | // The menu remains visible regardless of toggling highlight mouse cursor. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 850 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 851 | EXPECT_TRUE(CanCreateMenuItem()); |
| 852 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 853 | EXPECT_TRUE(CanCreateMenuItem()); |
| 854 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 855 | // The menu remains visible regardless of toggling highlight keyboard focus. |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 856 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 857 | EXPECT_TRUE(CanCreateMenuItem()); |
| 858 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 859 | EXPECT_TRUE(CanCreateMenuItem()); |
| 860 | |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 861 | // The menu remains visible regardless of toggling sticky keys. |
| 862 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 863 | EXPECT_TRUE(CanCreateMenuItem()); |
| 864 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 865 | EXPECT_TRUE(CanCreateMenuItem()); |
| 866 | |
| 867 | // The menu remains visible regardless of toggling tap dragging. |
| 868 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 869 | EXPECT_TRUE(CanCreateMenuItem()); |
| 870 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 871 | EXPECT_TRUE(CanCreateMenuItem()); |
| 872 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 873 | // Enabling all accessibility features. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 874 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 875 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 876 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 877 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 878 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 879 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 880 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 881 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 882 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 883 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 884 | EXPECT_TRUE(CanCreateMenuItem()); |
| 885 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 886 | EXPECT_TRUE(CanCreateMenuItem()); |
| 887 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 888 | EXPECT_TRUE(CanCreateMenuItem()); |
| 889 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 890 | EXPECT_TRUE(CanCreateMenuItem()); |
| 891 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 892 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 893 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 894 | EXPECT_TRUE(CanCreateMenuItem()); |
| 895 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 896 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 897 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 898 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 899 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 900 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 901 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 902 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 903 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 904 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 905 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 906 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 907 | EXPECT_TRUE(CanCreateMenuItem()); |
| 908 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 909 | EXPECT_TRUE(CanCreateMenuItem()); |
| 910 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 911 | EXPECT_TRUE(CanCreateMenuItem()); |
| 912 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 913 | EXPECT_TRUE(CanCreateMenuItem()); |
| 914 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 915 | EXPECT_TRUE(CanCreateMenuItem()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 916 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 917 | EXPECT_TRUE(CanCreateMenuItem()); |
| 918 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 919 | EXPECT_TRUE(CanCreateMenuItem()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 920 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 921 | SetShowAccessibilityOptionsInSystemTrayMenu(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 922 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 923 | // Confirms that the menu remains visible. |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 924 | EXPECT_TRUE(CanCreateMenuItem()); |
| 925 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 926 | SetShowAccessibilityOptionsInSystemTrayMenu(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 927 | |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 928 | // Confirms that the menu remains visible. |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 929 | EXPECT_TRUE(CanCreateMenuItem()); |
| 930 | } |
| 931 | |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 932 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowNotification) { |
| 933 | const base::string16 BRAILLE_CONNECTED = |
| 934 | base::ASCIIToUTF16("Braille display connected."); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 935 | const base::string16 CHROMEVOX_ENABLED_TITLE = |
| 936 | base::ASCIIToUTF16("ChromeVox enabled"); |
| 937 | const base::string16 CHROMEVOX_ENABLED = |
| 938 | base::ASCIIToUTF16("Press Ctrl + Alt + Z to disable spoken feedback."); |
| 939 | const base::string16 BRAILLE_CONNECTED_AND_CHROMEVOX_ENABLED_TITLE = |
| 940 | base::ASCIIToUTF16("Braille and ChromeVox are enabled"); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 941 | |
| 942 | EXPECT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
| 943 | |
| 944 | // Enabling spoken feedback should show the notification. |
| 945 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 946 | true, ash::A11Y_NOTIFICATION_SHOW); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 947 | message_center::NotificationList::Notifications notifications = |
| 948 | MessageCenter::Get()->GetVisibleNotifications(); |
| 949 | EXPECT_EQ(1u, notifications.size()); |
| 950 | EXPECT_EQ(CHROMEVOX_ENABLED_TITLE, (*notifications.begin())->title()); |
| 951 | EXPECT_EQ(CHROMEVOX_ENABLED, (*notifications.begin())->message()); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 952 | |
| 953 | // Connecting a braille display when spoken feedback is already enabled |
| 954 | // should only show the message about the braille display. |
| 955 | SetBrailleConnected(true); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 956 | notifications = MessageCenter::Get()->GetVisibleNotifications(); |
| 957 | EXPECT_EQ(1u, notifications.size()); |
| 958 | EXPECT_EQ(base::string16(), (*notifications.begin())->title()); |
| 959 | EXPECT_EQ(BRAILLE_CONNECTED, (*notifications.begin())->message()); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 960 | |
| 961 | // Neither disconnecting a braille display, nor disabling spoken feedback |
| 962 | // should show any notification. |
| 963 | SetBrailleConnected(false); |
| 964 | EXPECT_TRUE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 965 | notifications = MessageCenter::Get()->GetVisibleNotifications(); |
| 966 | EXPECT_EQ(0u, notifications.size()); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 967 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 968 | false, ash::A11Y_NOTIFICATION_SHOW); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 969 | notifications = MessageCenter::Get()->GetVisibleNotifications(); |
| 970 | EXPECT_EQ(0u, notifications.size()); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 971 | EXPECT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
| 972 | |
| 973 | // Connecting a braille display should enable spoken feedback and show |
| 974 | // both messages. |
| 975 | SetBrailleConnected(true); |
| 976 | EXPECT_TRUE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
yiyix | 2df25af | 2017-05-23 16:51:07 | [diff] [blame] | 977 | notifications = MessageCenter::Get()->GetVisibleNotifications(); |
| 978 | EXPECT_EQ(BRAILLE_CONNECTED_AND_CHROMEVOX_ENABLED_TITLE, |
| 979 | (*notifications.begin())->title()); |
| 980 | EXPECT_EQ(CHROMEVOX_ENABLED, (*notifications.begin())->message()); |
[email protected] | a81b2c3 | 2014-03-28 06:35:01 | [diff] [blame] | 981 | } |
| 982 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 983 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, KeepMenuVisibilityOnLockScreen) { |
[email protected] | 14c95c8 | 2013-01-30 06:30:29 | [diff] [blame] | 984 | // Enables high contrast mode. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 985 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 14c95c8 | 2013-01-30 06:30:29 | [diff] [blame] | 986 | EXPECT_TRUE(CanCreateMenuItem()); |
| 987 | |
| 988 | // Locks the screen. |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 989 | SetLoginStatus(ash::LoginStatus::LOCKED); |
[email protected] | 14c95c8 | 2013-01-30 06:30:29 | [diff] [blame] | 990 | EXPECT_TRUE(CanCreateMenuItem()); |
| 991 | |
| 992 | // Disables high contrast mode. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 993 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 14c95c8 | 2013-01-30 06:30:29 | [diff] [blame] | 994 | |
| 995 | // Confirms that the menu is still visible. |
| 996 | EXPECT_TRUE(CanCreateMenuItem()); |
| 997 | } |
| 998 | |
yoshiki | 82c93e1c | 2015-09-02 19:33:17 | [diff] [blame] | 999 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ClickDetailMenu) { |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 1000 | SetLoginStatus(ash::LoginStatus::USER); |
[email protected] | 8bacb66 | 2013-02-27 03:15:24 | [diff] [blame] | 1001 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1002 | // Confirms that the check item toggles the spoken feedback. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1003 | EXPECT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1004 | |
| 1005 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1006 | ClickSpokenFeedbackOnDetailMenu(); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1007 | EXPECT_TRUE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1008 | |
| 1009 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1010 | ClickSpokenFeedbackOnDetailMenu(); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1011 | EXPECT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1012 | |
| 1013 | // Confirms that the check item toggles the high contrast. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1014 | EXPECT_FALSE(AccessibilityManager::Get()->IsHighContrastEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1015 | |
| 1016 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1017 | ClickHighContrastOnDetailMenu(); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1018 | EXPECT_TRUE(AccessibilityManager::Get()->IsHighContrastEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1019 | |
| 1020 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1021 | ClickHighContrastOnDetailMenu(); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1022 | EXPECT_FALSE(AccessibilityManager::Get()->IsHighContrastEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1023 | |
| 1024 | // Confirms that the check item toggles the magnifier. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1025 | EXPECT_FALSE(AccessibilityManager::Get()->IsHighContrastEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1026 | |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1027 | EXPECT_FALSE(MagnificationManager::Get()->IsMagnifierEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1028 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1029 | ClickScreenMagnifierOnDetailMenu(); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1030 | EXPECT_TRUE(MagnificationManager::Get()->IsMagnifierEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1031 | |
| 1032 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1033 | ClickScreenMagnifierOnDetailMenu(); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1034 | EXPECT_FALSE(MagnificationManager::Get()->IsMagnifierEnabled()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1035 | |
| 1036 | // Confirms that the check item toggles autoclick. |
| 1037 | EXPECT_FALSE(AccessibilityManager::Get()->IsAutoclickEnabled()); |
| 1038 | |
| 1039 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1040 | ClickAutoclickOnDetailMenu(); |
| 1041 | EXPECT_TRUE(AccessibilityManager::Get()->IsAutoclickEnabled()); |
| 1042 | |
| 1043 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1044 | ClickAutoclickOnDetailMenu(); |
| 1045 | EXPECT_FALSE(AccessibilityManager::Get()->IsAutoclickEnabled()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1046 | |
| 1047 | // Confirms that the check item toggles on-screen keyboard. |
| 1048 | EXPECT_FALSE(AccessibilityManager::Get()->IsVirtualKeyboardEnabled()); |
| 1049 | |
| 1050 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1051 | ClickVirtualKeyboardOnDetailMenu(); |
| 1052 | EXPECT_TRUE(AccessibilityManager::Get()->IsVirtualKeyboardEnabled()); |
| 1053 | |
| 1054 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1055 | ClickVirtualKeyboardOnDetailMenu(); |
| 1056 | EXPECT_FALSE(AccessibilityManager::Get()->IsVirtualKeyboardEnabled()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1057 | |
| 1058 | // Confirms that the check item toggles large mouse cursor. |
| 1059 | EXPECT_FALSE(AccessibilityManager::Get()->IsLargeCursorEnabled()); |
| 1060 | |
| 1061 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1062 | ClickLargeMouseCursorOnDetailMenu(); |
| 1063 | EXPECT_TRUE(AccessibilityManager::Get()->IsLargeCursorEnabled()); |
| 1064 | |
| 1065 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1066 | ClickLargeMouseCursorOnDetailMenu(); |
| 1067 | EXPECT_FALSE(AccessibilityManager::Get()->IsLargeCursorEnabled()); |
| 1068 | |
| 1069 | // Confirms that the check item toggles mono audio. |
| 1070 | EXPECT_FALSE(AccessibilityManager::Get()->IsMonoAudioEnabled()); |
| 1071 | |
| 1072 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1073 | ClickMonoAudioOnDetailMenu(); |
| 1074 | EXPECT_TRUE(AccessibilityManager::Get()->IsMonoAudioEnabled()); |
| 1075 | |
| 1076 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1077 | ClickMonoAudioOnDetailMenu(); |
| 1078 | EXPECT_FALSE(AccessibilityManager::Get()->IsMonoAudioEnabled()); |
| 1079 | |
| 1080 | // Confirms that the check item toggles caret highlight. |
| 1081 | EXPECT_FALSE(AccessibilityManager::Get()->IsCaretHighlightEnabled()); |
| 1082 | |
| 1083 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1084 | ClickCaretHighlightOnDetailMenu(); |
| 1085 | EXPECT_TRUE(AccessibilityManager::Get()->IsCaretHighlightEnabled()); |
| 1086 | |
| 1087 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1088 | ClickCaretHighlightOnDetailMenu(); |
| 1089 | EXPECT_FALSE(AccessibilityManager::Get()->IsCaretHighlightEnabled()); |
| 1090 | |
| 1091 | // Confirms that the check item toggles highlight mouse cursor. |
| 1092 | EXPECT_FALSE(AccessibilityManager::Get()->IsCursorHighlightEnabled()); |
| 1093 | |
| 1094 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1095 | ClickHighlightMouseCursorOnDetailMenu(); |
| 1096 | EXPECT_TRUE(AccessibilityManager::Get()->IsCursorHighlightEnabled()); |
| 1097 | |
| 1098 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1099 | ClickHighlightMouseCursorOnDetailMenu(); |
| 1100 | EXPECT_FALSE(AccessibilityManager::Get()->IsCursorHighlightEnabled()); |
| 1101 | |
| 1102 | // Confirms that the check item toggles highlight keyboard focus. |
| 1103 | EXPECT_FALSE(AccessibilityManager::Get()->IsFocusHighlightEnabled()); |
| 1104 | |
| 1105 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1106 | ClickHighlishtKeyboardFocusOnDetailMenu(); |
| 1107 | EXPECT_TRUE(AccessibilityManager::Get()->IsFocusHighlightEnabled()); |
| 1108 | |
| 1109 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1110 | ClickHighlishtKeyboardFocusOnDetailMenu(); |
| 1111 | EXPECT_FALSE(AccessibilityManager::Get()->IsFocusHighlightEnabled()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1112 | |
| 1113 | // Confirms that the check item toggles sticky keys. |
| 1114 | EXPECT_FALSE(AccessibilityManager::Get()->IsStickyKeysEnabled()); |
| 1115 | |
| 1116 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1117 | ClickStickyKeysOnDetailMenu(); |
| 1118 | EXPECT_TRUE(AccessibilityManager::Get()->IsStickyKeysEnabled()); |
| 1119 | |
| 1120 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1121 | ClickStickyKeysOnDetailMenu(); |
| 1122 | EXPECT_FALSE(AccessibilityManager::Get()->IsStickyKeysEnabled()); |
| 1123 | |
| 1124 | // Confirms that the check item toggles tap dragging. |
| 1125 | EXPECT_FALSE(AccessibilityManager::Get()->IsTapDraggingEnabled()); |
| 1126 | |
| 1127 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1128 | ClickTapDraggingOnDetailMenu(); |
| 1129 | EXPECT_TRUE(AccessibilityManager::Get()->IsTapDraggingEnabled()); |
| 1130 | |
| 1131 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1132 | ClickTapDraggingOnDetailMenu(); |
| 1133 | EXPECT_FALSE(AccessibilityManager::Get()->IsTapDraggingEnabled()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1134 | } |
| 1135 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 1136 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, CheckMarksOnDetailMenu) { |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 1137 | SetLoginStatus(ash::LoginStatus::NOT_LOGGED_IN); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1138 | |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1139 | // At first, all of the check is unchecked. |
| 1140 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1141 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1142 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1143 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1144 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1145 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1146 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1147 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1148 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1149 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1150 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1151 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1152 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1153 | CloseDetailMenu(); |
| 1154 | |
| 1155 | // Enabling spoken feedback. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1156 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 1157 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1158 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1159 | EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1160 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1161 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1162 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1163 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1164 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1165 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1166 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1167 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1168 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1169 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1170 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1171 | CloseDetailMenu(); |
| 1172 | |
| 1173 | // Disabling spoken feedback. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1174 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 1175 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1176 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1177 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1178 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1179 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1180 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1181 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1182 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1183 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1184 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1185 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1186 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1187 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1188 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1189 | CloseDetailMenu(); |
| 1190 | |
| 1191 | // Enabling high contrast. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1192 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1193 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1194 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1195 | EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu()); |
| 1196 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1197 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1198 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1199 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1200 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1201 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1202 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1203 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1204 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1205 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1206 | CloseDetailMenu(); |
| 1207 | |
| 1208 | // Disabling high contrast. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1209 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1210 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1211 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1212 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1213 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1214 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1215 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1216 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1217 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1218 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1219 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1220 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1221 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1222 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1223 | CloseDetailMenu(); |
| 1224 | |
| 1225 | // Enabling full screen magnifier. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1226 | SetMagnifierEnabled(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1227 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1228 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1229 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1230 | EXPECT_TRUE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1231 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1232 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1233 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1234 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1235 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1236 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1237 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1238 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1239 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1240 | CloseDetailMenu(); |
| 1241 | |
| 1242 | // Disabling screen magnifier. |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1243 | SetMagnifierEnabled(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1244 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1245 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1246 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1247 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1248 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1249 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1250 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1251 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1252 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1253 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1254 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1255 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1256 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1257 | CloseDetailMenu(); |
| 1258 | |
| 1259 | // Enabling large cursor. |
| 1260 | AccessibilityManager::Get()->EnableLargeCursor(true); |
| 1261 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1262 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1263 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1264 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1265 | EXPECT_TRUE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1266 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1267 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1268 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1269 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1270 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1271 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1272 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1273 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1274 | CloseDetailMenu(); |
| 1275 | |
| 1276 | // Disabling large cursor. |
| 1277 | AccessibilityManager::Get()->EnableLargeCursor(false); |
| 1278 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1279 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1280 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1281 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1282 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1283 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1284 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1285 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1286 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1287 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1288 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1289 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1290 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1291 | CloseDetailMenu(); |
| 1292 | |
| 1293 | // Enable on-screen keyboard. |
| 1294 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
| 1295 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1296 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1297 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1298 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1299 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1300 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1301 | EXPECT_TRUE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1302 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1303 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1304 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1305 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1306 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1307 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1308 | CloseDetailMenu(); |
| 1309 | |
| 1310 | // Disable on-screen keyboard. |
| 1311 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
| 1312 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1313 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1314 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1315 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1316 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1317 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1318 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1319 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1320 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1321 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1322 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1323 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1324 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1325 | CloseDetailMenu(); |
| 1326 | |
| 1327 | // Enabling mono audio. |
| 1328 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 1329 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1330 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1331 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1332 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1333 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1334 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1335 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1336 | EXPECT_TRUE(IsMonoAudioEnabledOnDetailMenu()); |
| 1337 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1338 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1339 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1340 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1341 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1342 | CloseDetailMenu(); |
| 1343 | |
| 1344 | // Disabling mono audio. |
| 1345 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 1346 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1347 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1348 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1349 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1350 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1351 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1352 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1353 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1354 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1355 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1356 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1357 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1358 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1359 | CloseDetailMenu(); |
| 1360 | |
| 1361 | // Enabling caret highlight. |
| 1362 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 1363 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1364 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1365 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1366 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1367 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1368 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1369 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1370 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1371 | EXPECT_TRUE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1372 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1373 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1374 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1375 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1376 | CloseDetailMenu(); |
| 1377 | |
| 1378 | // Disabling caret highlight. |
| 1379 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 1380 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1381 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1382 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1383 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1384 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1385 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1386 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1387 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1388 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1389 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1390 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1391 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1392 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1393 | CloseDetailMenu(); |
| 1394 | |
| 1395 | // Enabling highlight mouse cursor. |
| 1396 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 1397 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1398 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1399 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1400 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1401 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1402 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1403 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1404 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1405 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1406 | EXPECT_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1407 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1408 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1409 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1410 | CloseDetailMenu(); |
| 1411 | |
| 1412 | // Disabling highlight mouse cursor. |
| 1413 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 1414 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1415 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1416 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1417 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1418 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1419 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1420 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1421 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1422 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1423 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1424 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1425 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1426 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1427 | CloseDetailMenu(); |
| 1428 | |
| 1429 | // Enabling highlight keyboard focus. |
| 1430 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
| 1431 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1432 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1433 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1434 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1435 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1436 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1437 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1438 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1439 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1440 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1441 | EXPECT_TRUE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1442 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1443 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1444 | CloseDetailMenu(); |
| 1445 | |
| 1446 | // Disabling highlight keyboard focus. |
| 1447 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
| 1448 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1449 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1450 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1451 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1452 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1453 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1454 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1455 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1456 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1457 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1458 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1459 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1460 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
| 1461 | CloseDetailMenu(); |
| 1462 | |
| 1463 | // Enabling sticky keys. |
| 1464 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 1465 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1466 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1467 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1468 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1469 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1470 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1471 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1472 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1473 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1474 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1475 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
| 1476 | EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu()); |
| 1477 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
| 1478 | CloseDetailMenu(); |
| 1479 | |
| 1480 | // Disabling sticky keys. |
| 1481 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 1482 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1483 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1484 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1485 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1486 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1487 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1488 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1489 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1490 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1491 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1492 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
| 1493 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1494 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
| 1495 | CloseDetailMenu(); |
| 1496 | |
| 1497 | // Enabling tap dragging. |
| 1498 | AccessibilityManager::Get()->EnableTapDragging(true); |
| 1499 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1500 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1501 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1502 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1503 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1504 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1505 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1506 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1507 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1508 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1509 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
| 1510 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1511 | EXPECT_TRUE(IsTapDraggingEnabledOnDetailMenu()); |
| 1512 | CloseDetailMenu(); |
| 1513 | |
| 1514 | // Disabling tap dragging. |
| 1515 | AccessibilityManager::Get()->EnableTapDragging(false); |
| 1516 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1517 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1518 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1519 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1520 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1521 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
| 1522 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
| 1523 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1524 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1525 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1526 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
| 1527 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1528 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1529 | CloseDetailMenu(); |
| 1530 | |
| 1531 | // Enabling all of the a11y features. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1532 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 1533 | true, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1534 | AccessibilityManager::Get()->EnableHighContrast(true); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1535 | SetMagnifierEnabled(true); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1536 | AccessibilityManager::Get()->EnableLargeCursor(true); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1537 | AccessibilityManager::Get()->EnableVirtualKeyboard(true); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1538 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 1539 | AccessibilityManager::Get()->EnableMonoAudio(true); |
| 1540 | AccessibilityManager::Get()->SetCaretHighlightEnabled(true); |
| 1541 | AccessibilityManager::Get()->SetCursorHighlightEnabled(true); |
| 1542 | AccessibilityManager::Get()->SetFocusHighlightEnabled(true); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1543 | AccessibilityManager::Get()->EnableStickyKeys(true); |
| 1544 | AccessibilityManager::Get()->EnableTapDragging(true); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1545 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1546 | EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1547 | EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu()); |
| 1548 | EXPECT_TRUE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1549 | EXPECT_TRUE(IsLargeCursorEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1550 | EXPECT_TRUE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1551 | EXPECT_TRUE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1552 | EXPECT_TRUE(IsMonoAudioEnabledOnDetailMenu()); |
| 1553 | EXPECT_TRUE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1554 | EXPECT_TRUE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1555 | // Focus highlighting can't be on when spoken feedback is on |
| 1556 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1557 | EXPECT_TRUE(IsStickyKeysEnabledOnDetailMenu()); |
| 1558 | EXPECT_TRUE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1559 | CloseDetailMenu(); |
| 1560 | |
| 1561 | // Disabling all of the a11y features. |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1562 | AccessibilityManager::Get()->EnableSpokenFeedback( |
jamescook | a7f8dab | 2016-06-21 01:44:03 | [diff] [blame] | 1563 | false, ash::A11Y_NOTIFICATION_NONE); |
[email protected] | 1dfebfc | 2013-06-04 03:14:32 | [diff] [blame] | 1564 | AccessibilityManager::Get()->EnableHighContrast(false); |
[email protected] | 7585f4c | 2013-01-10 18:26:41 | [diff] [blame] | 1565 | SetMagnifierEnabled(false); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1566 | AccessibilityManager::Get()->EnableLargeCursor(false); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1567 | AccessibilityManager::Get()->EnableVirtualKeyboard(false); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1568 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 1569 | AccessibilityManager::Get()->EnableMonoAudio(false); |
| 1570 | AccessibilityManager::Get()->SetCaretHighlightEnabled(false); |
| 1571 | AccessibilityManager::Get()->SetCursorHighlightEnabled(false); |
| 1572 | AccessibilityManager::Get()->SetFocusHighlightEnabled(false); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1573 | AccessibilityManager::Get()->EnableStickyKeys(false); |
| 1574 | AccessibilityManager::Get()->EnableTapDragging(false); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1575 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1576 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1577 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1578 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1579 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1580 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1581 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1582 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1583 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1584 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1585 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1586 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1587 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1588 | CloseDetailMenu(); |
| 1589 | |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1590 | // Enabling autoclick. |
| 1591 | AccessibilityManager::Get()->EnableAutoclick(true); |
| 1592 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1593 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1594 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1595 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1596 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1597 | EXPECT_TRUE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1598 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1599 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1600 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1601 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1602 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1603 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1604 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1605 | CloseDetailMenu(); |
| 1606 | |
| 1607 | // Disabling autoclick. |
| 1608 | AccessibilityManager::Get()->EnableAutoclick(false); |
| 1609 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1610 | EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
| 1611 | EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
| 1612 | EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
| 1613 | EXPECT_FALSE(IsLargeCursorEnabledOnDetailMenu()); |
| 1614 | EXPECT_FALSE(IsAutoclickEnabledOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1615 | EXPECT_FALSE(IsVirtualKeyboardEnabledOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1616 | EXPECT_FALSE(IsMonoAudioEnabledOnDetailMenu()); |
| 1617 | EXPECT_FALSE(IsCaretHighlightEnabledOnDetailMenu()); |
| 1618 | EXPECT_FALSE(IsHighlightMouseCursorEnabledOnDetailMenu()); |
| 1619 | EXPECT_FALSE(IsHighlightKeyboardFocusEnabledOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1620 | EXPECT_FALSE(IsStickyKeysEnabledOnDetailMenu()); |
| 1621 | EXPECT_FALSE(IsTapDraggingEnabledOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1622 | CloseDetailMenu(); |
| 1623 | } |
| 1624 | |
| 1625 | IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, CheckMenuVisibilityOnDetailMenu) { |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1626 | // Except help & settings, others should be kept the same |
| 1627 | // in LOGIN | NOT LOGIN | LOCKED. https://crbug.com/632107. |
sky | e79274a | 2016-06-08 05:39:02 | [diff] [blame] | 1628 | SetLoginStatus(ash::LoginStatus::NOT_LOGGED_IN); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1629 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1630 | EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu()); |
| 1631 | EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu()); |
| 1632 | EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1633 | EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1634 | EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 1635 | EXPECT_FALSE(IsHelpAvailableOnDetailMenu()); |
| 1636 | EXPECT_FALSE(IsSettingsAvailableOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1637 | EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu()); |
| 1638 | EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu()); |
| 1639 | EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu()); |
| 1640 | EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu()); |
| 1641 | EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1642 | EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu()); |
| 1643 | EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1644 | CloseDetailMenu(); |
| 1645 | |
jamescook | 85312ee5e | 2017-04-18 22:47:20 | [diff] [blame] | 1646 | // Simulate login. |
xiyuan | 8c6a411 | 2017-06-19 21:03:49 | [diff] [blame] | 1647 | CreateAndStartUserSession(AccountId::FromUserEmail("[email protected]")); |
jamescook | 85312ee5e | 2017-04-18 22:47:20 | [diff] [blame] | 1648 | // Flush to ensure the session state reaches ash and updates login status. |
| 1649 | SessionControllerClient::FlushForTesting(); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1650 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1651 | EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu()); |
| 1652 | EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu()); |
| 1653 | EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1654 | EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1655 | EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 1656 | EXPECT_TRUE(IsHelpAvailableOnDetailMenu()); |
| 1657 | EXPECT_TRUE(IsSettingsAvailableOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1658 | EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu()); |
| 1659 | EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu()); |
| 1660 | EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu()); |
| 1661 | EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu()); |
| 1662 | EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1663 | EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu()); |
| 1664 | EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1665 | CloseDetailMenu(); |
| 1666 | |
jamescook | 85312ee5e | 2017-04-18 22:47:20 | [diff] [blame] | 1667 | // Simulate screen lock. |
| 1668 | session_manager::SessionManager::Get()->SetSessionState( |
| 1669 | session_manager::SessionState::LOCKED); |
| 1670 | // Flush to ensure the session state reaches ash and updates login status. |
| 1671 | SessionControllerClient::FlushForTesting(); |
[email protected] | 5799902 | 2013-06-07 12:52:03 | [diff] [blame] | 1672 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1673 | EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu()); |
| 1674 | EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu()); |
| 1675 | EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu()); |
[email protected] | 7cfa31a | 2013-10-23 20:08:13 | [diff] [blame] | 1676 | EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu()); |
[email protected] | abdd0d7 | 2014-02-05 17:18:07 | [diff] [blame] | 1677 | EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 1678 | EXPECT_FALSE(IsHelpAvailableOnDetailMenu()); |
| 1679 | EXPECT_FALSE(IsSettingsAvailableOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1680 | EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu()); |
| 1681 | EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu()); |
| 1682 | EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu()); |
| 1683 | EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu()); |
| 1684 | EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1685 | EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu()); |
| 1686 | EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 1687 | CloseDetailMenu(); |
| 1688 | |
jamescook | 85312ee5e | 2017-04-18 22:47:20 | [diff] [blame] | 1689 | // Simulate adding multiprofile user. |
xiyuan | f1ff14d | 2017-03-20 20:28:14 | [diff] [blame] | 1690 | session_manager::SessionManager::Get()->SetSessionState( |
| 1691 | session_manager::SessionState::LOGIN_SECONDARY); |
xiyuan | 233f4e7 | 2017-04-06 06:59:56 | [diff] [blame] | 1692 | // Flush to ensure the session state reaches ash and updates login status. |
| 1693 | SessionControllerClient::FlushForTesting(); |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 1694 | EXPECT_TRUE(CreateDetailedMenu()); |
| 1695 | EXPECT_TRUE(IsSpokenFeedbackMenuShownOnDetailMenu()); |
| 1696 | EXPECT_TRUE(IsHighContrastMenuShownOnDetailMenu()); |
| 1697 | EXPECT_TRUE(IsScreenMagnifierMenuShownOnDetailMenu()); |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 1698 | EXPECT_TRUE(IsAutoclickMenuShownOnDetailMenu()); |
| 1699 | EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); |
tdanderson | 58114942 | 2016-10-25 21:37:58 | [diff] [blame] | 1700 | EXPECT_FALSE(IsHelpAvailableOnDetailMenu()); |
| 1701 | EXPECT_FALSE(IsSettingsAvailableOnDetailMenu()); |
minch | a0b24ab | 2017-03-31 22:16:01 | [diff] [blame] | 1702 | EXPECT_TRUE(IsLargeCursorMenuShownOnDetailMenu()); |
| 1703 | EXPECT_TRUE(IsMonoAudioMenuShownOnDetailMenu()); |
| 1704 | EXPECT_TRUE(IsCaretHighlightMenuShownOnDetailMenu()); |
| 1705 | EXPECT_TRUE(IsHighlightMouseCursorMenuShownOnDetailMenu()); |
| 1706 | EXPECT_TRUE(IsHighlightKeyboardFocusMenuShownOnDetailMenu()); |
minch | d9d54248 | 2017-04-07 19:29:56 | [diff] [blame] | 1707 | EXPECT_TRUE(IsStickyKeysMenuShownOnDetailMenu()); |
| 1708 | EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); |
[email protected] | 806d94e | 2012-12-16 20:31:26 | [diff] [blame] | 1709 | CloseDetailMenu(); |
| 1710 | } |
| 1711 | |
[email protected] | 5ace0c23 | 2013-05-29 00:48:41 | [diff] [blame] | 1712 | INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, |
| 1713 | TrayAccessibilityTest, |
| 1714 | testing::Values(PREF_SERVICE, |
| 1715 | POLICY)); |
| 1716 | |
[email protected] | cce1bad6 | 2013-01-04 02:26:38 | [diff] [blame] | 1717 | } // namespace chromeos |