Commit 148bc98c authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Revert "Switch Access: Add test for keyboard node."

This reverts commit d22c8914.

Reason for revert: This test continuously fails on linux-chromeos-dbg.
Sample build: https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-dbg/20743

Original change's description:
> Switch Access: Add test for keyboard node.
>
> This change adds a test to ensure Switch Access state gets updated
> when the virtual keyboard is opened and closed.
>
> Fixed: 1135248
> AX-Relnotes: N/A
> Change-Id: I1b894bce635f1790cee1111f50992c9136d3ded7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453899
> Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#814745}

TBR=dtseng@chromium.org,akihiroota@chromium.org

Change-Id: Icafd07fedf3f65fb637e8383aaaf57457efc709e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459698Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814993}
parent 5544f974
...@@ -107,7 +107,6 @@ js2gtest("switch_access_extjs_tests") { ...@@ -107,7 +107,6 @@ js2gtest("switch_access_extjs_tests") {
"nodes/basic_node_test.js", "nodes/basic_node_test.js",
"nodes/desktop_node_test.js", "nodes/desktop_node_test.js",
"nodes/group_node_test.js", "nodes/group_node_test.js",
"nodes/keyboard_node_test.js",
"nodes/tab_node_test.js", "nodes/tab_node_test.js",
"switch_access_predicate_test.js", "switch_access_predicate_test.js",
"text_navigation_manager_test.js", "text_navigation_manager_test.js",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
GEN_INCLUDE(['../switch_access_e2e_test_base.js']);
/** Test fixture for the keyboard node. */
SwitchAccessKeyboardNodeTest = class extends SwitchAccessE2ETest {};
TEST_F('SwitchAccessKeyboardNodeTest', 'OpenAndClose', function() {
this.runWithLoadedTree('<input type="text"></input>', async (desktop) => {
const waitForKeyboardVisibility = async (expectedVisibility) => {
return new Promise(resolve => {
if (KeyboardRootNode.isVisible_ === expectedVisibility) {
resolve();
return;
}
const listener = (evt) => {
if (evt.target.role === chrome.automation.RoleType.KEYBOARD &&
KeyboardRootNode.isVisible_ === expectedVisibility) {
resolve();
}
};
desktop.addEventListener(
chrome.automation.EventType.STATE_CHANGED, listener);
});
};
const input = desktop.find({role: chrome.automation.RoleType.TEXT_FIELD});
assertNotNullNorUndefined(input);
NavigationManager.instance.moveTo_(input);
assertEquals(
chrome.automation.RoleType.TEXT_FIELD,
NavigationManager.currentNode.role,
'Did not successfully move to the input');
// Open the virtual keyboard and assert focus gets placed on the back
// button.
NavigationManager.enterKeyboard();
await waitForKeyboardVisibility(true);
assertTrue(KeyboardRootNode.isVisible_);
assertUndefined(KeyboardRootNode.getKeyboardObject().state.invisible);
assertTrue(NavigationManager.currentNode instanceof BackButtonNode);
// Close the virtual keyboard and assert focus moves back to the input.
NavigationManager.exitKeyboard();
await waitForKeyboardVisibility(false);
assertFalse(KeyboardRootNode.isVisible_);
assertTrue(KeyboardRootNode.getKeyboardObject().state.invisible);
assertEquals(
chrome.automation.RoleType.TEXT_FIELD,
NavigationManager.currentNode.role,
'Did not successfully move to the input');
});
});
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment