-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8366852: java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java test is failing #27161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
8366852: java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java test is failing #27161
Conversation
👋 Welcome back azvegint! A progress list of the required criteria for merging this PR into |
@azvegint This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 89 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
throw new RuntimeException("Mouse Wheel over the choice failed!"); | ||
} | ||
// mouse wheel doesn't work for the choice on X11 and Mac, so skip it | ||
if (!isXtoolkit && !isLWCToolkit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this block required? As in the description it is mentioned that the wheel rotation is taken care for macos down below and it seems test works ok without this block too..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different case that only works on Windows. When the mouse cursor is above the choice, you should be able to change the items using the mouse wheel (without click and showing a popup)
public static void main(String[] args) { | ||
new ChoiceMouseWheelTest(); | ||
public static void main(String[] args) throws Exception { | ||
ChoiceMouseWheelTest test = Util.invokeOnEDT(ChoiceMouseWheelTest::new); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any need to have dependancy on Util..we can use EventQueue directly, right? That will help in running standalone too!!
Also jtreg tags is not aligned with asterisks and author tag not removed||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any need to have dependancy on Util..we can use EventQueue directly, right? That will help in running standalone too!!
It was already there, so I decided to use it. It greatly reduce the code amount.
Also jtreg tags is not aligned with asterisks and author tag not removed||
updated
|
||
public class ChoiceMouseWheelTest extends Frame { | ||
|
||
private volatile boolean itemChanged = false; | ||
private volatile boolean wheelMoved = false; | ||
private volatile boolean frameExited = false; | ||
private final Choice choice = new Choice(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHy not do the initialization in EDT in constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already on EDT, but moved to the constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM.
* @test | ||
* @key headful | ||
* @bug 7050935 | ||
* @summary closed/java/awt/Choice/WheelEventsConsumed/WheelEventsConsumed.html fails on win32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: You may want to change the test path in the summary
There are several major issues with the test:
frameExited
variable is set to true when the mouse pointer exits the frame. The test does not expect this to happen with the first mouse click on thechoice
when the mouse pointer is already over the test frame (frame mouseExited - > choice mouseEntered). A reset for the frameExited was added.setVisible()
, so the test can start operating not on a fully visible window (e.g. one with an appearance animation). A delay has been added.Testing looks good.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27161/head:pull/27161
$ git checkout pull/27161
Update a local copy of the PR:
$ git checkout pull/27161
$ git pull https://git.openjdk.org/jdk.git pull/27161/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27161
View PR using the GUI difftool:
$ git pr show -t 27161
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27161.diff
Using Webrev
Link to Webrev Comment