< prev index next >
test/jdk/javax/swing/JFileChooser/8041694/bug8041694.java
Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke
*** 25,36 ****
* @test
* @key headful
* @bug 8041694
* @summary JFileChooser removes trailing spaces in the selected directory name
* @author Anton Litvinov
! * @library ../../../../lib/testlibrary
! * @build jdk.testlibrary.OSInfo
* @run main bug8041694
*/
import java.awt.AWTException;
import java.awt.Robot;
--- 25,36 ----
* @test
* @key headful
* @bug 8041694
* @summary JFileChooser removes trailing spaces in the selected directory name
* @author Anton Litvinov
! * @library /test/lib
! * @build jdk.test.lib.Platform
* @run main bug8041694
*/
import java.awt.AWTException;
import java.awt.Robot;
*** 43,53 ****
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;
! import jdk.testlibrary.OSInfo;
public class bug8041694 {
private static volatile File dir1;
private static File dir2;
private static volatile File selectedDir;
--- 43,53 ----
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;
! import jdk.test.lib.Platform;
public class bug8041694 {
private static volatile File dir1;
private static File dir2;
private static volatile File selectedDir;
*** 57,67 ****
// Set Metal L&F to make the test compatible with OS X.
UIManager.setLookAndFeel(new MetalLookAndFeel());
Robot robot = new Robot();
dir1 = Files.createTempDirectory("bug8041694").toFile();
! if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS) {
dir2 = new File(String.format(
"\\\\?\\%s\\d ", dir1.getAbsolutePath().replace('/', '\\')));
} else {
dir2 = new File(dir1.getAbsolutePath() + File.separator + "d ");
}
--- 57,67 ----
// Set Metal L&F to make the test compatible with OS X.
UIManager.setLookAndFeel(new MetalLookAndFeel());
Robot robot = new Robot();
dir1 = Files.createTempDirectory("bug8041694").toFile();
! if (Platform.isWindows()) {
dir2 = new File(String.format(
"\\\\?\\%s\\d ", dir1.getAbsolutePath().replace('/', '\\')));
} else {
dir2 = new File(dir1.getAbsolutePath() + File.separator + "d ");
}
< prev index next >