mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-09 14:38:42 +00:00
Test update
This commit is contained in:
parent
91151bce29
commit
b588d51d85
@ -966,7 +966,6 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
|
||||
ui.installUI(this);
|
||||
}
|
||||
invalidate();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
import java.awt.Robot;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
@ -48,6 +49,7 @@ public class TestPopupInvoker {
|
||||
static JFrame frame;
|
||||
static JLabel label;
|
||||
static Container pane;
|
||||
static volatile Component invoker;
|
||||
|
||||
private static final CountDownLatch popupShown = new CountDownLatch(1);
|
||||
private static final CountDownLatch popupHidden = new CountDownLatch(1);
|
||||
@ -107,6 +109,11 @@ public class TestPopupInvoker {
|
||||
if (!popupHidden.await(1, SECONDS)) {
|
||||
throw new RuntimeException("Popup is visible after component is removed");
|
||||
}
|
||||
SwingUtilities.invokeAndWait(() -> invoker = popupMenu.getInvoker());
|
||||
|
||||
if (invoker != null) {
|
||||
throw new RuntimeException("Invoker is not null");
|
||||
}
|
||||
} finally {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
if (frame != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user