Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8258924: javax/swing/JSplitPane/4201995/bug4201995.java fails in GTk L&F
Reviewed-by: serb
  • Loading branch information
prsadhuk committed Jan 4, 2021
1 parent f351e15 commit a2a3f4a3dcdf3aa7eb9f17d892d1ffe729733330
Showing with 25 additions and 10 deletions.
  1. +0 −1 test/jdk/ProblemList.txt
  2. +25 −9 test/jdk/javax/swing/JSplitPane/4201995/bug4201995.java
@@ -735,7 +735,6 @@ javax/swing/JComboBox/6559152/bug6559152.java 8164484 linux-x64
# The next test below is an intermittent failure
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
javax/swing/JColorChooser/Test6827032.java 8197825 windows-all
javax/swing/JSplitPane/4201995/bug4201995.java 8079127 generic-all
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all
javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all,macosx-all
@@ -32,16 +32,32 @@

public class bug4201995 {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
boolean expectedOpaqueValue = !"Nimbus".equals(UIManager.getLookAndFeel().getName());
JSplitPane sp = new JSplitPane();
for (UIManager.LookAndFeelInfo LF :
UIManager.getInstalledLookAndFeels()) {
try {
UIManager.setLookAndFeel(LF.getClassName());
} catch (UnsupportedLookAndFeelException ignored) {
System.out.println("Unsupported L&F: " + LF.getClassName());
continue;
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException e) {
throw new RuntimeException(e);
}
System.out.println("Testing L&F: " + LF.getClassName());
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
boolean expectedOpaqueValue =
!("Nimbus".equals(UIManager.getLookAndFeel().getName()) ||
UIManager.getLookAndFeel().getName().contains("GTK"));
JSplitPane sp = new JSplitPane();
System.out.println("sp.isOpaque " + sp.isOpaque());

if (sp.isOpaque() != expectedOpaqueValue) {
throw new RuntimeException("JSplitPane has incorrect default opaque value");
if (sp.isOpaque() != expectedOpaqueValue) {
throw new RuntimeException("JSplitPane has incorrect default opaque value");
}
}
}
});
});
}
}
}

0 comments on commit a2a3f4a

Please sign in to comment.