test/jdk/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java
changeset 54231 e4813eded7cb
parent 50834 9cf279436b9d
equal deleted inserted replaced
54230:d9d9655bb077 54231:e4813eded7cb
    20  * or visit www.oracle.com if you need additional information or have any
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
       
    25   @test
       
    26   @key headful
    25   @bug 6392086 8014725
    27   @bug 6392086 8014725
    26   @summary Tests basic DnD functionality in an applet
    28   @summary tests that HTMLs of all supported native HTML formats are transfered
    27   @author Alexey Utkin, Semyon Sadetsky
    29            properly
    28   @run applet HTMLTransferTest.html
    30   @run main/othervm HTMLTransferTest
    29 */
    31 */
    30 
    32 
    31 /**
       
    32  * HTMLTransferTest.java
       
    33  *
       
    34  * summary: tests that HTMLs of all supported native HTML formats
       
    35  *          are transfered properly
       
    36  */
       
    37 
       
    38 import java.applet.Applet;
       
    39 import java.awt.*;
    33 import java.awt.*;
    40 import java.awt.datatransfer.*;
    34 import java.awt.datatransfer.*;
    41 import java.io.*;
    35 import java.io.*;
    42 
    36 
    43 
    37 public class HTMLTransferTest {
    44 public class HTMLTransferTest extends Applet {
       
    45     public static final int CODE_NOT_RETURNED = 100;
    38     public static final int CODE_NOT_RETURNED = 100;
    46     public static final int CODE_CONSUMER_TEST_FAILED = 101;
    39     public static final int CODE_CONSUMER_TEST_FAILED = 101;
    47     public static final int CODE_FAILURE = 102;
    40     public static final int CODE_FAILURE = 102;
    48     public static DataFlavor[] HTMLFlavors = null;
    41     public static DataFlavor[] HTMLFlavors = null;
    49     public static DataFlavor SyncFlavor = null;
    42     public static DataFlavor SyncFlavor = null;
    63         }
    56         }
    64     }
    57     }
    65 
    58 
    66     private THTMLProducer imPr;
    59     private THTMLProducer imPr;
    67     private int returnCode = CODE_NOT_RETURNED;
    60     private int returnCode = CODE_NOT_RETURNED;
       
    61 
       
    62     public static void main(final String[] args) {
       
    63         HTMLTransferTest app = new HTMLTransferTest();
       
    64         app.init();
       
    65         app.start();
       
    66     }
    68 
    67 
    69     public void init() {
    68     public void init() {
    70         initImpl();
    69         initImpl();
    71 
    70 
    72     } // init()
    71     } // init()