Bug 448499

Summary: CheckedListBox, ListBox: list with wrong status
Product: [Mono] UI Automation Reporter: calen chen <cachen>
Component: Winforms - GeneralAssignee: Mario Carrion <mcarrion>
Status: VERIFIED INVALID QA Contact: E-mail List <mono-a11y-qa>
Severity: Normal    
Priority: P2 - High CC: mgorse, sshaw
Version: Release 0.9   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.0   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 474863    
Bug Blocks:    
Attachments: patch uploaded.
patch uploaded.

Description calen chen 2008-11-25 06:59:25 UTC
PROBLEM STATEMENT:

As Mike mentioned before, CheckedListBox and ListBox are Similar To GtkList that makes them with some extra status

REPRO:

1. run accerciser
2. run uia2atk/test/samples/checkedlistbox.py and listbox.py
3. run uia2atk/test/samples/gtklist.py
4. in accerciser, expand 'ipy' on the left tree, select item which is with
"list" roll, compare the states of GTK list and SWF list under "interface viewer"


RESULTS:

SWF list role get states:
Enabled, Focusable, Manages Descendants, Sensitive, Showing, Visible 

GTK list role get states:
Enabled, Sensitive, Showing, Visible


EXPECTED RESULTS:

I expect the states of SWF list is the same as GTK list'
Comment 1 calen chen 2008-11-25 06:59:41 UTC
This test is due 11/26. I push up the priority to P1. 
Comment 2 Neville Gao 2008-11-25 07:20:06 UTC
Created attachment 255046 [details]
patch uploaded.
Comment 3 calen chen 2008-11-25 08:53:21 UTC
MORE COMMENTS:

also "list item" role in CheckedListBox and ListBox have incorrect states.

SWF "list item":
ENABLED, FOCUSABLE, SELECTABLE, SENSITIVE, SHOWING, SINGLE_LINE, TRANSIENT, VISIBLE

GTK “list item":
ENABLED, FOCUSABLE, SELECTABLE, SENSITIVE, SHOWING, VISIBLE, +-SELECTED, +-FOCUSED
Comment 4 Neville Gao 2008-11-25 10:21:01 UTC
Created attachment 255112 [details]
patch uploaded.
Comment 5 Michael Gorse 2008-11-25 14:37:41 UTC
The controls are actually behaving as currently described in the spec, except that the spec doesn't list SingleLine and doesn't list states for the children of a ListBox (it does list states for children of a CheckedListBox).  So mostly the question is whether the spec should be changed.  I agree that what is currently there is not quite like a Gtk.List or a Gtk.TreeTable.
Comment 6 calen chen 2008-11-26 02:59:21 UTC
Hi Mike, let me make sure again that these two controls are implemented depend on the spec, it means they role name are similar to Gtk.List, they states are similar to Gtk.Store + Gtk.TreeView, right? Thanks Mike!
Comment 7 calen chen 2008-11-26 05:28:40 UTC
have talk with Mike, I would like to drop down the priority and severity


<mgorse|away> calen: That's what the spec currently lists
<calen> mgorse|away, brad : yes, except "single line" not in spec. another opinion, I mean we need add it into spec, and also I think we need modify spec because CheckedListBox and ListBox not similar to Gtk.List entirety except role name.
<calen> mgorse|away, of course, it's not a big issue, I just need make sure what is our test should following :)
Comment 8 calen chen 2008-12-17 07:52:57 UTC
I reruned this test in trunk r121663, checkedlistbox still have focus problem:

save below script as script.py, then running "script.py */samples/checkedlistbox.py", from the print you can see both list[0] and checkbox[0] have "focused" state. and the weird thing is in accerciser I didn't see checkbox[0] with focused state but I got it from pyatspi. how do you design *focused state? I didn't got the information from Specification.

list[0] states:[STATE_ENABLED, STATE_FOCUSABLE, STATE_FOCUSED, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE, STATE_MANAGES_DESCENDANTS]
checkboxs[0] states:[STATE_ENABLED, STATE_FOCUSABLE, STATE_FOCUSED, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_SINGLE_LINE, STATE_TRANSIENT, STATE_VISIBLE]

#!/usr/bin/env python

import pyatspi
import time
import subprocess as s
import sys

s.Popen(sys.argv[1])
print "sleeping"
time.sleep(5)
print "done sleeping"

reg = pyatspi.Registry
desktop = reg.getDesktop(0)
ipy = pyatspi.findDescendant(desktop, lambda x: x.name == 'ipy' and x.getRoleName() == 'application')
lists = pyatspi.findAllDescendants(ipy, lambda x: x.getRoleName() == 'list')
checkboxs = pyatspi.findAllDescendants(ipy, lambda x: x.getRoleName() == 'check box')

print "list[0] states:%s\r\ncheckboxs[0] states:%s"  % (lists[0].getState().getStates(), checkboxs[0].getState().getStates())


push to P2, thanks
Comment 9 Mario Carrion 2009-02-11 22:36:56 UTC
Seems that fixing Bug #474863 will also fix this one.
Comment 10 Mario Carrion 2009-02-12 14:54:10 UTC
This should be already working when Mike fixed #448499.
Comment 11 Mario Carrion 2009-02-12 14:54:47 UTC
(In reply to comment #10)
> This should be already working when Mike fixed #448499.
I meant: Bug #474863.
Comment 12 Stephen Shaw 2009-02-26 19:28:36 UTC
list role doesn't seem to be used any more. closing.
Comment 13 calen chen 2009-02-27 05:54:57 UTC
thanks for Stephen's help to close this bug

I add a new bug480218 for duplicate 'focused' issue(Comment #8)