7160653: test/javax/swing/plaf/synth/7158712/bug7158712.java failed on Ubuntu
Reviewed-by: alexp
--- a/jdk/test/javax/swing/plaf/synth/7158712/bug7158712.java Wed Apr 11 18:44:33 2012 -0700
+++ b/jdk/test/javax/swing/plaf/synth/7158712/bug7158712.java Thu Apr 12 12:48:31 2012 +0300
@@ -28,6 +28,8 @@
@author Pavel Porvatov
*/
+import sun.awt.SunToolkit;
+
import javax.swing.*;
import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.synth.SynthLookAndFeel;
@@ -65,7 +67,7 @@
UIManager.setLookAndFeel(laf);
- EventQueue.invokeLater(new Runnable() {
+ EventQueue.invokeAndWait(new Runnable() {
public void run() {
comboBox = new JComboBox<>(
new String[]{"Very Looooooooooooooooooooong Text Item 1", "Item 2"});
@@ -80,6 +82,8 @@
}
});
+ ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
Point comboBoxLocation = Util.invokeOnEDT(new Callable<Point>() {
@Override
public Point call() throws Exception {