Bug 456336

Summary: ComboBox_DropDown: combo box and text role with wrong states
Product: [Mono] UI Automation Reporter: calen chen <cachen>
Component: Winforms - GeneralAssignee: E-mail List <mono-a11y-bugs>
Status: REOPENED --- QA Contact: E-mail List <mono-a11y-qa>
Severity: Normal    
Priority: P3 - Medium    
Version: Unspecified   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.0   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description calen chen 2008-12-04 06:37:22 UTC
PROBLEM STATEMENT:

"combo box" and "text" roles have incorrect status that is different with gtk.comboboxentry(sample/gtkcomboboxentry.py). combo box role have extraneous "focused" state. text role have extraneous "selected" but missing "focused" state

REPRO:

1. run accerciser
2. run uia2atk/test/samples/combobox_dropdown.py
3. run uia2atk/test/samples/gtkcomboboxentry.py
4. in accerciser, expand 'ipy' on the left tree, select item which is with
"combo box" role, compare the states of it in Gtk.comboboxentry and in SWF.combobox under "interface viewer"
5. select item which is with "text" role, compare the states of it in Gtk.comboboxentry and in SWF.combobox under "interface viewer"


RESULTS:

in step 4:
SWF "combo box" role get states [Enabled, Focused, Sensitive, Showing, Visible]

GTK "combo box" role get states [Enabled, Sensitive, Showing, Visible]

in step 5:
SWF "text" role get states [EDITABLE, ENABLED, FOCUSABLE, SELECTABLE, SELECTED, SENSITIVE, SHOWING, SINGLE_LINE, VISIBLE]

GTK "text" role get states [EDITABLE, ENABLED, FOCUSABLE, +-FOCUSED(you can press Tab move focused from text to dropdown button), SENSITIVE, SHOWING, SINGLE_LINE, VISIBLE]

EXPECTED RESULTS:

so I expect the states of SWF combobox's combo box and text role are the same as GTK comboboxentry's combo box and text
Comment 1 calen chen 2008-12-04 06:37:53 UTC
this test due 12/10, I give it P1 priority
Comment 2 calen chen 2008-12-04 07:10:59 UTC
MODIFY:

in step 5:
SWF "text" role get states [EDITABLE, ENABLED, FOCUSABLE, SELECTABLE, SELECTED,
SENSITIVE, SHOWING, SINGLE_LINE, VISIBLE]

GTK "text" role get states [EDITABLE, ENABLED, FOCUSABLE, +-FOCUSED(you can
press Tab move focused from text to dropdown button), selecteable, +-SELECTED(when you selecte text from Selection box for combobox role), SENSITIVE, SHOWING,
SINGLE_LINE, VISIBLE]



Comment 3 Andres Aragoneses 2008-12-10 16:28:31 UTC
Sorry, I didn't know you had assigned this earlier.
Comment 4 Brad Taylor 2008-12-12 16:37:39 UTC
Fixed in r121438.
Comment 5 Brad Taylor 2008-12-12 16:44:43 UTC
Backported to 0.9 branch in 121440.
Comment 6 calen chen 2008-12-15 03:19:12 UTC
Closed in trunk r121505
Comment 7 Brian Merrell 2008-12-18 20:55:20 UTC
In trunk, I still don't think our SWF behavior matches Gtk behavior.  

For example, compare the following:

Gtk
1.  Open accericer, click on the interface viewer tab and expand the "Accessible" expander.
2.  Run uia2atk/test/samples/gtkcomboboxentry.py
3.  Browse to and select accessible with the "combo box" role that is a child of the gtkcomboboxentry.py sample application above.
4.  Observe that Accerciser's interface viewer tab shows that the combo box accessible does not have the "focused" state.
4.  Browse to and select accessible with the "text" role that is a child of the gtkcomboboxentry.py sample application above.
5.  Observe that Accerciser's interface viewer tab shows that the text accessible has the "focused" state and the cursor is blinking in the Gtk.Entry widget on the gtkcomboboxentry.py sample application.
6.  In the gtkcomboboxentry.py app, click on the drop down button
7.  Observe that Accerciser's interface viewer tab shows that the text accessible no longer has the "focused" role
8.  Select the accessible with the "combo box" role in Accerciser's left pane
9.  Observe that it has the "focused" role (it did not previously)

WinForms
1.  Open accericer, click on the interface viewer tab and expand the "Accessible" expander.
2.  Run uia2atk/test/samples/combobox_dropdown.py
3.  Browse to and select accessible with the "combo box" role that is a child of the combobox_dropdown.py sample application above.
4.  Observe that Accerciser's interface viewer tab shows that the combo box accessible does have the "focused" state (whereas gtk does not at this point)
3.  Browse to and select accessible with the "text" role that is a child of the combobox_dropdown ipy sample application above.
4.  Observe that Accerciser's interface viewer tab shows that the text accessible *does not* have the "focused" state and the cursor is blinking in the text entry control on the combobox_dropdown sample application (whereas gtk *does* have the focus state at this point)
5.  Observer that the "combo box" accessible appears to always have the focused state.

I never see a case where the text accessible has the focused state in WinForms in trunk.  However, the text accessible does get the "focused" state in the 0.9 branch :(  so I think part of this bug is back in trunk.  Ugh!  Anyway, I am reopening this.

Calen, could you please make sure we are testing for the expected behavior (regarding this bug) in your ComboBox DropDown test if you haven't already?
Comment 8 calen chen 2008-12-19 02:43:40 UTC
Hi Brian, I tried in trunk r121827 but I couldn't reproduced the issue you said in Comment #7. here is combobox and text default states I got it by pyatspi, you need make the application window in active(click the frame window) then you can see "focused" appear in interface viewer tab.

combobox default states:[STATE_ENABLED, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE]
text default states:[STATE_EDITABLE, STATE_ENABLED, STATE_FOCUSABLE, STATE_FOCUSED, STATE_SELECTABLE, STATE_SELECTED, STATE_SENSITIVE, STATE_SHOWING, STATE_SINGLE_LINE, STATE_VISIBLE]

but there is one problem I have no idea that text role and MenuItem have focused in duplicated after selected one MenuItem by keyUp/Down or click(please see bug456343 Comment #8)
Comment 9 Brian Merrell 2008-12-19 08:09:06 UTC
Sigh.. I was testing using RPMs built from trunk and I didn't realize the newest ones were from Dec 11th and this bug was fixed on Dec 12th.  My comments are irrelevant; I'm closing this bug again.
Comment 10 calen chen 2008-12-19 15:11:32 UTC
Closed again in trunk r121848
Comment 11 calen chen 2010-02-05 09:46:08 UTC
I would like to reopen this one because BUG577363.
Comment 12 Brad Taylor 2010-02-09 22:24:22 UTC
This shouldn't be assigned to me.