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

8315825: Open some swing tests #15830

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/jdk/javax/swing/JComponent/bug4765272.java
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@
* questions.
*/

/* @test
/*
* @test
* @bug 4765272
* @summary REGRESSION: IAE: focusCycleRoot not focus cyle root of a Component
* @key headful
@@ -105,8 +106,8 @@ public void focusGained(FocusEvent e) {
});

Robot r = new Robot();
r.delay(1000);
r.waitForIdle();
r.delay(1000);

SwingUtilities.invokeAndWait(() -> {
bt1.requestFocus();
7 changes: 4 additions & 3 deletions test/jdk/javax/swing/JComponent/bug4979794.java
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@
* questions.
*/

/* @test
/*
* @test
* @bug 4979794
* @summary A component is sometimes the next component for itself in focus policy.
* @key headful
@@ -67,16 +68,16 @@ public static void main(String[] args) throws Exception {
});

Robot r = new Robot();
r.delay(1000);
r.waitForIdle();
r.delay(1000);

SwingUtilities.invokeAndWait(() -> {
Container root = btn1.getFocusCycleRootAncestor();
FocusTraversalPolicy policy = root.getFocusTraversalPolicy();
Component next1 = policy.getComponentAfter(fr, btn1);
Component next2 = policy.getComponentAfter(fr, btn2);
if (next1 == next2) {
throw new Error("btn1 and btn2 have the same next Component.");
throw new RuntimeException("btn1 and btn2 have the same next Component.");
}
});
} finally {
5 changes: 3 additions & 2 deletions test/jdk/javax/swing/JPanel/bug4907772.java
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@
* questions.
*/

/* @test
/*
* @test
* @bug 4907772
* @summary 1.4 REGRESSION: JPanel responds to mouse clicks on overlapping JPanel
* @key headful
@@ -66,8 +67,8 @@ public static void main(String[] args) throws Exception {
});

Robot r = new Robot();
r.delay(1000);
r.waitForIdle();
r.delay(1000);

SwingUtilities.invokeAndWait(() -> {
Container root = btn1.getFocusCycleRootAncestor();
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ public class RootPaneChecking {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> {
MyJFrame frame = new MyJFrame();
frame.setTitle("RootPaneChecking");
checkRootPaneCheckingEnabled(frame);
frame.setRootPaneCheckingEnabled(false);
checkRootPaneCheckingDisabled(frame);