Commit 28ed57e3 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Ensure the construction of EditableTextNode takes precedence over ComboBoxNode

A node can be both a combo box and editable.
This is given by the
textFieldWithComboBox
role.

R=anastasi@google.com

Bug: 1110157Text
Test: place focus over Gmail's compose dialog and the to text field. Verify an EditableTextNode wrapper is created and not a ComboBoxNode.
Change-Id: Ia6726a5c3e687b225cd3b20d2e5f69300c1a585c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336957Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795579}
parent e506a507
......@@ -202,13 +202,13 @@ class NodeWrapper extends SAChildNode {
* @return {!NodeWrapper}
*/
static create(baseNode, parent) {
if (AutomationPredicate.comboBox(baseNode)) {
return new ComboBoxNode(baseNode, parent);
}
if (SwitchAccessPredicate.isTextInput(baseNode)) {
return new EditableTextNode(baseNode, parent);
}
if (AutomationPredicate.comboBox(baseNode)) {
return new ComboBoxNode(baseNode, parent);
}
switch (baseNode.role) {
case chrome.automation.RoleType.SLIDER:
return new SliderNode(baseNode, parent);
......
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