Skip to content
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

JDK-8282046: Create a regression test for JDK-8000326 #7512

Closed
wants to merge 8 commits into from

Conversation

srmandal
Copy link

@srmandal srmandal commented Feb 17, 2022

Create a regression test for CCC8000326

Issue is identified by JDK-8000326, which identifies that after focus moves into JMenuBar, whose focus traversal key is disabled by default, it never moves to other focusable component.

By default, pressing the Tab key does not transfer focus from a JMenuBar which is added to a container together with other Swing components, because the focusTraversalKeysEnabled property of JMenuBar is set to false. To resolve this, you should call the JMenuBar.setFocusTraversalKeysEnabled(true) method.

The test verifies focus traversal for the above described scenario.
This review is for migrating tests from a closed test suite to open.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8282046: Create a regression test for JDK-8000326

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7512/head:pull/7512
$ git checkout pull/7512

Update a local copy of the PR:
$ git checkout pull/7512
$ git pull https://git.openjdk.java.net/jdk pull/7512/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7512

View PR using the GUI difftool:
$ git pr show -t 7512

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7512.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 17, 2022

👋 Welcome back smandalika! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 17, 2022

@srmandal The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Feb 17, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 17, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 17, 2022

test/jdk/java/awt/Focus/CCC8000326/CCC8000326.java Outdated Show resolved Hide resolved
test/jdk/java/awt/Focus/CCC8000326/CCC8000326.java Outdated Show resolved Hide resolved
test/jdk/java/awt/Focus/CCC8000326/CCC8000326.java Outdated Show resolved Hide resolved
test/jdk/java/awt/Focus/CCC8000326/CCC8000326.java Outdated Show resolved Hide resolved
test/jdk/java/awt/Focus/CCC8000326/CCC8000326.java Outdated Show resolved Hide resolved
@srmandal
Copy link
Author

srmandal commented Mar 9, 2022

@aivanov-jdk Can you please review this PR?

@srmandal
Copy link
Author

This review is for migrating tests from a closed test suite to open.

@srmandal srmandal changed the title JDK-8282046: Create a regression test for CCC8000326 JDK-8282046: Create a regression test for JDK-8000326 Mar 11, 2022
Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You copied the test into the new folder but the old folder still remains. You have to remove it. We don't want two identical tests in different locations.

@aivanov-jdk
Copy link
Member

Does the test reproduce the problem described in JDK-8000326?

The bug was resolved in 8-b78. So the test should fail when run with 8-b77. Could you please confirm?

@srmandal
Copy link
Author

As indicated by the comment here in bug JDK-8000326, the fix in 8-b78 was made not in code but in the docs, to clarify that the failure in focus traversal from Menu Bar to the other components was due to the default false value set to jMenuBar's focusTraversalKeysEnabled and is as expected.

The test is to ensure that with jMenuBar.setFocusTraversalKeysEnabled(true), <Line no 82 in Test> the focus traversal across the components of the the UI is successful.

The test fails in jdk8-b77, jdk8-b78, as well as in latest JDK8u builds with jMenuBar.setFocusTraversalKeysEnabled(false)
The test passes in jdk8-b77, jdk8-b78, as well as in latest JDK8u builds with jMenuBar.setFocusTraversalKeysEnabled(true)
This is the expected behavior.

@srmandal
Copy link
Author

You copied the test into the new folder but the old folder still remains. You have to remove it. We don't want two identical tests in different locations.

I have now deleted the duplicate file.

@aivanov-jdk
Copy link
Member

This review is for migrating tests from a closed test suite to open.

If you know when the test was first introduced, please update the copyright year to include the year when the test was originally written.

@openjdk
Copy link

openjdk bot commented Mar 22, 2022

@srmandal 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:

8282046: Create a regression test for JDK-8000326

Reviewed-by: aivanov

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 425 new commits pushed to the master branch:

  • eb5b712: 8283701: Add final or sealed modifier to appropriate java.awt.color ICC_Profile API classes
  • d066856: 8282162: [vector] Optimize integral vector negation API
  • bfd9c2b: 8283015: Create a test for JDK-4715496
  • 8cdabea: 8207025: JvmtiEnv::SetSystemProperty() does not handle OOM
  • 272d653: 8283889: Fix Typo in open/src/java.sql/share/classes/java/sql/package-info.java
  • a9a9b90: 8283723: Update Visual Studio 2022 to version 17.1.0 for Oracle builds on Windows
  • 489b27d: 8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver
  • 072f2c4: 8283782: Redundant verification of year in LocalDate::ofEpochDay
  • 2fef5d4: 8281853: serviceability/sa/ClhsdbThreadContext.java failed with NullPointerException: Cannot invoke "sun.jvm.hotspot.gc.shared.GenCollectedHeap.getGen(int)" because "this.heap" is null
  • f9f439a: 8283717: vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001 failed due to SocketTimeoutException
  • ... and 415 more: https://git.openjdk.java.net/jdk/compare/b4900b1298e536c0ceaa77bc0ac0e8e6ccba6400...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@aivanov-jdk) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 22, 2022
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 23, 2022
…st.java


Added missing space after comma.

Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk@users.noreply.github.com>
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 24, 2022
@srmandal
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 30, 2022
@openjdk
Copy link

openjdk bot commented Mar 30, 2022

@srmandal
Your change (at version ea83680) is now ready to be sponsored by a Committer.

@srmandal
Copy link
Author

@aivanov-jdk Can you please sponsor my changes?

@aivanov-jdk
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 30, 2022

Going to push as commit 97c7298.
Since your change was applied there have been 438 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 30, 2022
@openjdk openjdk bot closed this Mar 30, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 30, 2022
@openjdk
Copy link

openjdk bot commented Mar 30, 2022

@aivanov-jdk @srmandal Pushed as commit 97c7298.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants