test/jdk/java/awt/dnd/DragInterceptorAppletTest/DragInterceptorAppletTest.java
author jdv
Wed, 15 May 2019 10:10:53 +0530
branchmetal-prototype-branch
changeset 57357 f3beca8f19fc
parent 54231 e4813eded7cb
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     1
/*
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
     2
 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     4
 *
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     7
 * published by the Free Software Foundation.
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     8
 *
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    13
 * accompanied this code).
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    14
 *
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    18
 *
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    21
 * questions.
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    22
 */
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    23
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    24
/*
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    25
  @test
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    26
  @key headful
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    27
  @bug 6887703
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    28
  @summary Unsigned applet can retrieve the dragged information before drop action occurs
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    29
  @library ../../regtesthelpers
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    30
  @library ../../regtesthelpers/process
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    31
  @build Util
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    32
  @build ProcessResults ProcessCommunicator
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    33
  @run main/othervm DragInterceptorAppletTest main
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    34
*/
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    35
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    36
import java.awt.Point;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    37
import java.awt.Robot;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    38
import java.awt.event.InputEvent;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    39
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    40
import test.java.awt.regtesthelpers.Util;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    41
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    42
import test.java.awt.regtesthelpers.process.ProcessResults;
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    43
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    44
import static java.lang.Thread.sleep;
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    45
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    46
public class DragInterceptorAppletTest {
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    47
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    48
    public void start() {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    49
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    50
        SourceFrame sourceFrame = new SourceFrame();
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    51
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    52
        Util.waitForIdle(null);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    53
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    54
        String [] args = new String [] {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    55
            String.valueOf(sourceFrame.getNextLocationX()),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    56
            String.valueOf(sourceFrame.getNextLocationY()),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    57
            String.valueOf(sourceFrame.getDragSourcePointX()),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    58
            String.valueOf(sourceFrame.getDragSourcePointY()),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    59
        };
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    60
        String classpath = System.getProperty("java.class.path");
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    61
        ProcessResults processResults =
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    62
            ProcessCommunicator.executeChildProcess(this.getClass(),classpath,args);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    63
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    64
        verifyTestResults(processResults);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    65
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    66
    }// start()
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    67
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    68
    private static void verifyTestResults(ProcessResults processResults) {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    69
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    70
    switch (processResults.getExitValue()) {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    71
        case InterprocessMessages.DATA_WAS_INTERCEPTED_AND_EXCEPTION_HANDLER_WAS_NOT_TRIGGERED:
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    72
            processResults.printProcessErrorOutput(System.err);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    73
            throw new RuntimeException("TEST IS FAILED: Target applet can intercept data " +
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    74
                    "without a clipboard permission and an exception handler was not triggered.");
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    75
            //Unreachable...
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    76
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    77
        case InterprocessMessages.DATA_WAS_INTERCEPTED:
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    78
            processResults.printProcessErrorOutput(System.err);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    79
            throw new RuntimeException("TEST IS FAILED: Target applet can intercept data " +
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    80
                    "without a clipboard permission");
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    81
            //Unreachable...
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    82
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    83
        case InterprocessMessages.EXCEPTION_HANDLER_WAS_NOT_TRIGGERED:
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    84
            processResults.printProcessErrorOutput(System.err);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    85
            throw new RuntimeException("TEST IS FAILED: An exception handler was not triggered.");
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    86
            //Unreachable...
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    87
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    88
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    89
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    90
        //    The child process throws an exception. do not look at the stderr.
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    91
        processResults.verifyStdErr(System.err);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    92
        processResults.verifyProcessExitValue(System.err);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    93
        processResults.printProcessStandartOutput(System.out);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    94
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    95
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    96
    //We cannot make an instance of the applet without the default constructor
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    97
    public DragInterceptorAppletTest() {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    98
        super();
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
    99
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   100
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   101
    //We need in this constructor to pass frame position between JVMs
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   102
    public DragInterceptorAppletTest(Point targetFrameLocation, Point dragSourcePoint)
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   103
            throws InterruptedException
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   104
    {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   105
        DragInterceptorFrame targetFrame = new DragInterceptorFrame(targetFrameLocation);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   106
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   107
        Util.waitForIdle(null);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   108
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   109
        final Robot robot = Util.createRobot();
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   110
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   111
        robot.mouseMove((int)dragSourcePoint.getX(),(int)dragSourcePoint.getY());
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   112
        sleep(100);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   113
        robot.mousePress(InputEvent.BUTTON1_MASK);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   114
        sleep(100);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   115
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   116
        sleep(100);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   117
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   118
        Util.drag(robot, dragSourcePoint, targetFrame.getDropTargetPoint(),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   119
                InputEvent.BUTTON1_MASK);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   120
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   121
        sleep(2000);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   122
        ProcessCommunicator.destroyProcess();
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   123
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   124
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   125
    enum InterprocessArguments {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   126
        TARGET_FRAME_X_POSITION_ARGUMENT,
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   127
        TARGET_FRAME_Y_POSITION_ARGUMENT,
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   128
        DRAG_SOURCE_POINT_X_ARGUMENT,
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   129
        DRAG_SOURCE_POINT_Y_ARGUMENT;
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   130
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   131
        int extract (String [] args) {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   132
            return Integer.parseInt(args[this.ordinal()]);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   133
        }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   134
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   135
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
   136
    public static void main(final String[] args) {
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
   137
        if (args.length > 0 && args[0].equals("main")) {
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
   138
            new DragInterceptorAppletTest().start();
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
   139
            return;
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
   140
        }
24563
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   141
        Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   142
                InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   143
        Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   144
                InterprocessArguments.TARGET_FRAME_Y_POSITION_ARGUMENT.extract(args));
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   145
        try {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   146
            new DragInterceptorAppletTest(targetFrameLocation, dragSourcePoint);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   147
        } catch (InterruptedException e) {
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   148
            e.printStackTrace();
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   149
            throw new RuntimeException(e);
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   150
        }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   151
    }
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   152
33eb483cebec 8014755: [TEST_BUG] frames didn't closed after execution some awt/dnd/ tests
bagiras
parents:
diff changeset
   153
}// class DragInterceptorAppletTest