Bug 448020

Summary: CheckedListBox, ListBox: list with wrong name
Product: [Mono] UI Automation Reporter: calen chen <cachen>
Component: Winforms - GeneralAssignee: Mario Carrion <mcarrion>
Status: VERIFIED FIXED QA Contact: E-mail List <mono-a11y-qa>
Severity: Normal    
Priority: P2 - High    
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: ---

Description calen chen 2008-11-24 03:13:06 UTC
PROBLEM STATEMENT:
in checkedlistbox.py and listbox.py sample, there are no name setting for both checkedlistbox and listbox, but in accerciser you would see checkedlistbox and listbox with "list" role shows name is the same as label's text what are top of them.

REPRO:

1. run accerciser
2. run uia2atk/test/samples/checkedlistbox.py
3. in accerciser, expand 'ipy' on the left tree, there are two items with "list" role, and two items with "label" role

4. run uia2atk/test/samples/listbox.py
5. 3. in accerciser, expand 'ipy' on the left tree, there is one item with "list" role, and one item with "label" role

RESULTS:
in step 3 and step 5, list get label's text as its name, in fact it doesn't set name for list in the example


EXPECTED RESULTS:

I expect SWF list role doesn't shows name that is similar to Gtk list

COMMENTS:
running the gtk example that list without name, you will not get label's text as list name. 

#!/usr/bin/env python
import gtk

def main():
    win = gtk.Window()
    win.set_title("Main Window")
    win.connect("destroy", lambda win: gtk.main_quit())

    vbox = gtk.VBox()
    win.add(vbox)
    vbox.show()

    label = gtk.Label("This is a label")
    vbox.pack_start(label, False)
    label.show()

    ls = gtk.List()
    selection = ls.get_selection()
    ls.show()
    vbox.pack_start(ls, True)
    
    win.set_default_size (200,300)
    win.show_all()
    gtk.main()
    
if __name__ == '__main__':
    main()



This test is due 11/26. I push up the priority to P1. any questions please let me know!
Comment 1 calen chen 2008-11-24 03:26:47 UTC
sorry i would like to add more info for RESULTS in Description

RESULTS:
in step 3 list[0] with "CheckOnClick False" name list[1] with "CheckOnClick True" name. in step 5 list with "You select" name. that is means list get label's text as its name, in fact it doesn't set name for list in the example
Comment 2 calen chen 2008-11-24 10:48:30 UTC
MORE COMMENTS:

BTW, if i give text and name for listbox(checkedlistbox is the same) like this:
self.listbox.Name = "listbox name"   
self.listbox.Text = "listbox text"

list also get the label's text as name in Linux, but in Vista, UISpy can get "listbox text" as name
Comment 3 Mario Carrion 2008-11-24 16:01:13 UTC
Fixed in UiaAtkBridge r119797.
Comment 4 Mario Carrion 2008-11-24 16:03:10 UTC
(In reply to comment #2 from Calen Chen)
> MORE COMMENTS:
> 
> BTW, if i give text and name for listbox(checkedlistbox is the same) like this:
> self.listbox.Name = "listbox name"   
> self.listbox.Text = "listbox text"
> 
> list also get the label's text as name in Linux, but in Vista, UISpy can get
> "listbox text" as name

I'm not sure about this one, because I wrote a simple test in Vista including one SWF.Label and one SWF.ListBox and setting SWF.ListBox.Text doesn't change any value in UISpy, can you share your example?, maybe I'm doing something wrong.

Comment 5 Mario Carrion 2008-11-24 16:12:32 UTC
Backported to 0.9 UiaAtkBridge r119798.

I'm closing as FIXED, please let me know if you find something else.
Comment 6 Mario Carrion 2008-11-24 16:30:45 UTC
Adding hours.
Comment 7 calen chen 2008-11-25 02:50:38 UTC
Mario, thanks you work on it so quickly:) in r119911, list doesn't get label's text as its name which I think you have fixed the most issue! but the name shows empty even though i give listbox.Text, I have update our examples on samples/checkedlistbox.py and samples/listbox.py.

btw, I have tried Gtk.list, I couldn't set Text for. if I set it like this gtk.List("aaa") it returns "TypeError: gtk.List.__init__() takes exactly 0 arguments (1 given)" because gtk.List doesn't have set_text property. i am not sure if it would affect SWF list issue to be fixed. thanks again!
Comment 8 calen chen 2008-11-25 03:00:11 UTC
I reopen it because listbox.Text question!
Comment 9 Mario Carrion 2008-12-01 16:31:42 UTC
Sorry for the delay.

This should be fixed in r120363 UIAutomationWinforms (trunk), I also wrote the test in Vista to confirm.

Comment 10 calen chen 2008-12-02 03:49:24 UTC
Closed in r120449, "list" role without name that is similar to Gtk.List