< prev index next >

test/jdk/java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,43 +20,34 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /*
-  test
+  @test
+  @key headful
   @bug 4899516
   @summary Transferable has no DataFlavors when dragging from Gnome window to Swing
-  @author : area=dnd
-  @run applet URIListBetweenJVMsTest.html
+  @library ../../regtesthelpers
+  @library ../../regtesthelpers/process
+  @build Util
+  @build ProcessResults ProcessCommunicator
+  @run main/othervm URIListBetweenJVMsTest main
 */
 
-/**
- * URIListBetweenJVMsTest.java
- *
- * summary: Transferable has no DataFlavors when dragging from Gnome window to Swing
- */
-
 import static java.lang.Thread.sleep;
 
 import test.java.awt.regtesthelpers.process.ProcessCommunicator;
 import test.java.awt.regtesthelpers.process.ProcessResults;
 import test.java.awt.regtesthelpers.Util;
-import java.applet.Applet;
 import java.awt.*;
 import java.awt.event.InputEvent;
-import java.io.*;
 
-public class URIListBetweenJVMsTest extends Applet {
+public class URIListBetweenJVMsTest {
 
     // information related to the test in common
     static int VISIBLE_RAWS_IN_LIST=15;
 
-    public void init() {
-        setLayout(new BorderLayout());
-
-    }//End  init()
-
     public void start() {
 
     String toolkit = Toolkit.getDefaultToolkit().getClass().getName();
     if (toolkit.equals("sun.awt.windows.WToolkit")){
         System.out.println("This test is not for the Windows platform. Passed.");

@@ -138,10 +129,14 @@
             return Integer.parseInt(args[this.ordinal()]);
         }
     }
 
     public static void main (String [] args) {
+        if (args.length > 0 && args[0].equals("main")) {
+            new URIListBetweenJVMsTest().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 >