Bug 509276 - PrintPreviewDialog: All zoom menu items have the "checked" state
Summary: PrintPreviewDialog: All zoom menu items have the "checked" state
Status: VERIFIED FIXED
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: x86 openSUSE 11.1
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Michael Gorse
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-02 20:54 UTC by Brian Merrell
Modified: 2009-07-29 07:38 UTC (History)
2 users (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.40 KB, text/plain)
2009-06-02 22:48 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-06-02 20:54:43 UTC
PROBLEM STATEMENT

When the zoom toggle button (the button with the magnifying glass icon on the
tool bar) of the PrintPreviewDialog is clicked, a new "window" accessible
appears that has a "menu" child.  This "menu" accessible has several "menu item" accessibles.  The problem is that all the "menu item" accessibles have the "checked" state.  Only one menu item can be selected in the GUI, so only one "menu item" accessible should have the "checked" state.

REPRO

1.  Run uia2atk/test/samples/printpreviewdialog.py and click on the "PrintPreviewDialog" button.
2.  Run the attached script, which performs the "click" action of the "menu" accessible to open it and then prints the states of all of the menu items.

RESULTS

All of the menu items have the "checked" states

EXPECTED RESULTS

Exactly one menu item--the one that is checked on the GUI--should have the "checked" state.  By default the "Auto" menu item is checked.

COMMENTS

If you close the zoom menu and run the script a second time without closing the PrintPreviewDialog or changing anything else on the GUI, then none of the menu items have the "checked" state.
Comment 1 Brian Merrell 2009-06-02 22:48:03 UTC
Created attachment 295847 [details]
pyatspi script referenced in REPRO steps
Comment 2 Michael Gorse 2009-07-17 13:48:34 UTC
I think that this is caused by the MenuItem SelectionItem behavior always returning true for IsSelected.  I'm curious if there's a reason for this behavior.
Comment 3 Sanford Armstrong 2009-07-27 19:26:32 UTC
(In reply to comment #2)
> I think that this is caused by the MenuItem SelectionItem behavior always
> returning true for IsSelected.  I'm curious if there's a reason for this
> behavior.

The reason is that I mistakenly thought that setting RadioCheck=True alone would cause the checked RadioButton to appear, but it turns out you must also set Checked=True as well.

I just tested on Vista, and if you set RadioCheck=True and Checked=False, the item *should* implement SelectionItem and IsSelected should False.

So Mike's right, and IsSelected should return item.Checked.

Sorry for the confusion!
Comment 4 Michael Gorse 2009-07-27 20:39:24 UTC
Waiting for review.
Comment 5 Michael Gorse 2009-07-28 15:02:39 UTC
Fixed in UIAutomationWinforms R138843 (trunk) and 138844 (1.0 branch).
Comment 6 Feng Xia Mu 2009-07-29 07:38:39 UTC
test on:
mono-core-138178-1486.src.rpm
mono-uia-132785-276.src.rpm
uiaatkbridge-138148-675.src.rpm
uiautomationwinforms-138872-683.src.rpm
Revision: 138918