< prev index next >
test/jdk/javax/swing/JFileChooser/4524490/bug4524490.java
Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke
*** 26,44 ****
* @key headful
* @bug 4524490
* @summary Tests if in JFileChooser, ALT+L does not bring focus to 'Files' selection list in Motif LAF
* @author Konstantin Eremin
* @library ../../regtesthelpers
! * @library ../../../../lib/testlibrary
! * @build Util jdk.testlibrary.OSInfo
* @run main bug4524490
*/
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import javax.swing.*;
! import jdk.testlibrary.OSInfo;
public class bug4524490 {
private static JFileChooser fileChooser;
--- 26,45 ----
* @key headful
* @bug 4524490
* @summary Tests if in JFileChooser, ALT+L does not bring focus to 'Files' selection list in Motif LAF
* @author Konstantin Eremin
* @library ../../regtesthelpers
! * @library /test/lib
! * @build Util jdk.test.lib.Platform
* @run main bug4524490
*/
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import javax.swing.*;
!
! import jdk.test.lib.Platform;
public class bug4524490 {
private static JFileChooser fileChooser;
*** 56,66 ****
}
});
robot.waitForIdle();
! if (OSInfo.OSType.MACOSX.equals(OSInfo.getOSType())) {
Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_L);
} else {
Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_L);
}
checkFocus();
--- 57,67 ----
}
});
robot.waitForIdle();
! if (Platform.isOSX()) {
Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_L);
} else {
Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_L);
}
checkFocus();
< prev index next >