Bug 500811 - Menu items do not receive focused or selected states despite the events being issued
Summary: Menu items do not receive focused or selected states despite the events being...
Status: VERIFIED FIXED
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Unspecified
Hardware: x86 openSUSE 11.1
: P2 - High : Normal
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on: 485524
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 22:36 UTC by Brian Merrell
Modified: 2009-06-04 09:25 UTC (History)
1 user (show)

See Also:
Found By: Integration Test
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
pyatspi script referenced in REPRO steps (1.72 KB, text/plain)
2009-05-04 22:37 UTC, Brian Merrell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Merrell 2009-05-04 22:36:03 UTC
PROBLEM STATEMENT:

Even though the events appear to be issued for +focused and +selected state changes, neither the focused or the selected states are present when the states are queried

REPRO:

1.  Run uia2atk/test/samples/menustrip.py
2.  Run Accerciser and browse to and select the "File" *menu item* in Accerciser's left pane
3.  In Accerciser, open the "Event Monitor" tab and do the following:
    a. Under "Source" select the "Selected accessible" radio button.
    b. Ensure that the "Monitor Events" button is depressed
    c. Select all check boxes in the "Name" column (of the tree view with "Name" and "Full name" columns)
4.  Run the attached pyatspi script, and click on the menustrip.py window title bar when the script prompts you to do so

RESULTS:

The script will print the states of the new menu:

[STATE_ENABLED, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE]

Accerciser will record the following events:

object:state-changed:selected(1, 0, None)
	source: [menu item | New]
	application: [application | ipy]
object:state-changed:focused(1, 0, None)
	source: [menu item | New]
	application: [application | ipy]
focus:(0, 0, None)
	source: [menu item | New]
	application: [application | ipy]

EXPECTED RESULTS:

I would expect that the new menu states include the focused and selected states.  (That is what Gtk does.)
Comment 1 Brian Merrell 2009-05-04 22:37:47 UTC
Created attachment 289856 [details]
pyatspi script referenced in REPRO steps
Comment 2 Andres Aragoneses 2009-05-04 22:42:18 UTC
This depends on bug 485524 to be fixed (am working on it).

BTW, Brian, when you say:

> I would expect that the new menu states include the focused and selected
> states.  (That is what Gtk does.)

Do you mean that this bug doesn't exist?:

http://bugzilla.gnome.org/show_bug.cgi?id=580452

What I mean is that it would be helpful if you could run the same script against Gtk and confirm (or mark as invalid) that BGO bug. (Also, testing against latest gail, aka trunk/master, is desirable.)
Comment 3 Brian Merrell 2009-05-04 22:52:03 UTC
(In reply to comment #2)
> This depends on bug 485524 to be fixed (am working on it).
> 
> BTW, Brian, when you say:
> 
> > I would expect that the new menu states include the focused and selected
> > states.  (That is what Gtk does.)

Ugh, that should really say "new menu item states" instead of "new menu states"

> 
> Do you mean that this bug doesn't exist?:
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=580452
> 
> What I mean is that it would be helpful if you could run the same script
> against Gtk and confirm (or mark as invalid) that BGO bug. (Also, testing
> against latest gail, aka trunk/master, is desirable.)

Whoa, I hadn't observed that BGO bug before.  In fact, I can only reproduce it sporadically.  It doesn't happen all of the time, but if I sit here and hover the mouse to and from "Select All" I invariably see it.
Comment 4 Brian Merrell 2009-05-05 15:20:10 UTC
*** Bug 493560 has been marked as a duplicate of this bug. ***
Comment 5 Andres Aragoneses 2009-05-12 14:36:11 UTC
Brian, now that bug 485524 has been fixed, there's a chance this one is fixed as well, can you check? Thanks!
Comment 6 Brian Merrell 2009-05-31 05:16:35 UTC
This issue appears to be fixed.  Thanks Andres, you can go ahead and mark it as such.
Comment 7 Andres Aragoneses 2009-05-31 16:52:30 UTC
Thanks
Comment 8 Feng Xia Mu 2009-06-04 09:25:28 UTC
verify in :
mono-core-135321-1142.src.rpm
mono-uia-132785-276.src.rpm
uiaatkbridge-134036-662.src.rpm
uiautomationwinforms-134512-668.src.rpm
Revision: 135381

P.S.
Comment #1
the pyatspi script, line 21:
 "x.getRoleName() == 'menu item'" should be replaced "x.getRoleName() == 'menu'"