< prev index next >

test/jdk/java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,65 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 8029565 @summary Conversion of a URI list to File list fails - @author Petr Pchelko <petr.pchelko@oracle.com> @library ../../regtesthelpers @library ../../regtesthelpers/process @build Util @build ProcessResults ProcessCommunicator ! @run applet/othervm URIListToFileListBetweenJVMsTest.html ! */ ! ! /** ! * URIListToFileListBetweenJVMsTest.java ! * ! * summary: DnD of File-List across JVM adds two empty items to the list */ import test.java.awt.regtesthelpers.Util; import test.java.awt.regtesthelpers.process.ProcessCommunicator; import test.java.awt.regtesthelpers.process.ProcessResults; - import java.applet.Applet; import java.awt.*; import java.awt.event.InputEvent; import static java.lang.Thread.sleep; ! public class URIListToFileListBetweenJVMsTest extends Applet { // information related to the test in common static int VISIBLE_RAWS_IN_LIST=15; - public void init() { - setLayout(new BorderLayout()); - } - public void start() { SourceFileListFrame sourceFrame = new SourceFileListFrame(); Util.waitForIdle(null); --- 20,54 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 8029565 @summary Conversion of a URI list to File list fails @library ../../regtesthelpers @library ../../regtesthelpers/process @build Util @build ProcessResults ProcessCommunicator ! @run main/othervm URIListToFileListBetweenJVMsTest main */ import test.java.awt.regtesthelpers.Util; import test.java.awt.regtesthelpers.process.ProcessCommunicator; import test.java.awt.regtesthelpers.process.ProcessResults; import java.awt.*; import java.awt.event.InputEvent; import static java.lang.Thread.sleep; ! public class URIListToFileListBetweenJVMsTest { // information related to the test in common static int VISIBLE_RAWS_IN_LIST=15; public void start() { SourceFileListFrame sourceFrame = new SourceFileListFrame(); Util.waitForIdle(null);
*** 125,135 **** int extract (String [] args) { return Integer.parseInt(args[this.ordinal()]); } } ! public static void main (String [] args) throws Exception { Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args), InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args)); Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args), InterprocessArguments.TARGET_FRAME_Y_POSITION_ARGUMENT.extract(args)); int transferredFilesNumber = InterprocessArguments.FILES_IN_THE_LIST_NUMBER_ARGUMENT.extract(args); --- 114,128 ---- int extract (String [] args) { return Integer.parseInt(args[this.ordinal()]); } } ! public static void main(final String [] args) throws Exception { ! if (args.length > 0 && args[0].equals("main")) { ! new URIListToFileListBetweenJVMsTest().start(); ! return; ! } Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args), InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args)); Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args), InterprocessArguments.TARGET_FRAME_Y_POSITION_ARGUMENT.extract(args)); int transferredFilesNumber = InterprocessArguments.FILES_IN_THE_LIST_NUMBER_ARGUMENT.extract(args);
< prev index next >