jdk/test/javax/swing/SwingTest.java
author hseigel
Wed, 01 Mar 2017 08:00:02 -0500
changeset 46194 5596e6f63072
parent 27764 4e79ff3e0602
permissions -rw-r--r--
8172307: Remove ununsed JVM API JVM_GetModuleByPackageName() Summary: Remove get_module_by_package_name() etc., and unneeded test. Reviewed-by: sspitsyn, gtriantafill
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3502
diff changeset
     2
 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     4
 *
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     8
 *
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    13
 * accompanied this code).
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    14
 *
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3502
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3502
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3502
diff changeset
    21
 * questions.
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    22
 */
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    23
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    24
import java.awt.Toolkit;
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    25
import java.lang.reflect.InvocationTargetException;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    26
import java.lang.reflect.Method;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    27
import java.lang.reflect.Modifier;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    28
import java.util.Comparator;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    29
import java.util.Iterator;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    30
import java.util.Set;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    31
import java.util.TreeSet;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    32
import javax.swing.JFrame;
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    33
import javax.swing.SwingUtilities;
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    34
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    35
/**
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    36
 * SwingTest is a utility class for writing regression tests
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    37
 * that require interacting with the UI.
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    38
 * It uses reflection to invoke all public methods without parameters.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    39
 * All static methods are starting on the current thread.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    40
 * Other methods including constructor are starting on the EDT.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    41
 * Between each method invocation all pending events are processed.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    42
 * The methods are sorted by name and invoked in that order.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    43
 * Failure of the test is signaled by any method throwing an exception.
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    44
 * If no methods throw an exception the test is assumed to have passed.
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    45
 *
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    46
 * @author Sergey A. Malenkov
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    47
 */
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    48
final class SwingTest implements Runnable {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    49
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    50
    private static final int WIDTH = 640;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    51
    private static final int HEIGHT = 480;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    52
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    53
    public static void start(Class<?> type) throws Throwable {
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    54
        new SwingTest(type).start();
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    55
    }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    56
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    57
    private final Class<?> type;
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    58
    private final Iterator<Method> methods;
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    59
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    60
    private JFrame frame;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    61
    private Object object;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    62
    private Method method;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    63
    private Throwable error;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    64
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    65
    private SwingTest(Class<?> type) {
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    66
        Set<Method> methods = new TreeSet<Method>(new Comparator<Method>() {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    67
            public int compare(Method first, Method second) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    68
                return first.getName().compareTo(second.getName());
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    69
            }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    70
        });
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    71
        for (Method method : type.getMethods()) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    72
            if (method.getDeclaringClass().equals(type)) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    73
                if (method.getReturnType().equals(void.class)) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    74
                    if (0 == method.getParameterTypes().length) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    75
                        methods.add(method);
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    76
                    }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    77
                }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    78
            }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    79
        }
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    80
        this.type = type;
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    81
        this.methods = methods.iterator();
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    82
    }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    83
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    84
    public void run() {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    85
        try {
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    86
            if (this.object == null) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    87
                System.out.println(this.type);
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    88
                this.frame = new JFrame(this.type.getSimpleName());
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    89
                this.frame.setSize(WIDTH, HEIGHT);
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    90
                this.frame.setLocationRelativeTo(null);
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    91
                this.object = this.type.getConstructor(this.frame.getClass()).newInstance(this.frame);
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    92
                this.frame.setVisible(true);
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
    93
            }
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    94
            else if (this.method != null) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    95
                System.out.println(this.method);
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    96
                this.method.invoke(this.object);
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    97
            }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    98
            else {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
    99
                System.out.println((this.error == null) ? "PASSED" : "FAILED"); // NON-NLS: debug
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   100
                this.frame.dispose();
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   101
                this.frame = null;
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   102
            }
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   103
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   104
        catch (NoSuchMethodException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   105
            this.error = exception;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   106
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   107
        catch (SecurityException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   108
            this.error = exception;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   109
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   110
        catch (IllegalAccessException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   111
            this.error = exception;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   112
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   113
        catch (IllegalArgumentException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   114
            this.error = exception;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   115
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   116
        catch (InstantiationException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   117
            this.error = exception;
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   118
        }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   119
        catch (InvocationTargetException exception) {
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   120
            this.error = exception.getTargetException();
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   121
        }
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   122
        System.out.flush();
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   123
        this.method = this.methods.hasNext() && (this.error == null)
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   124
                ? this.methods.next()
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   125
                : null;
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   126
    }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   127
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   128
    private void start() throws Throwable {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   129
        do {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   130
            if ((this.method != null) && Modifier.isStatic(this.method.getModifiers())) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   131
                run(); // invoke static method on the current thread
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   132
            }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   133
            else {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   134
                SwingUtilities.invokeLater(this); // invoke on the event dispatch thread
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   135
            }
27764
4e79ff3e0602 8063106: Change open swing regression tests to avoid sun.awt.SunToolkit.realSync, part 1
yan
parents: 5506
diff changeset
   136
            java.awt.Robot robot = new java.awt.Robot();
4e79ff3e0602 8063106: Change open swing regression tests to avoid sun.awt.SunToolkit.realSync, part 1
yan
parents: 5506
diff changeset
   137
            robot.waitForIdle();
3502
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   138
        }
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   139
        while (this.frame != null);
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   140
        if (this.error != null) {
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   141
            throw this.error;
821e773cae60 6865565: Test failed: /test/closed/javax/swing/JInternalFrame/6325652/bug6325652.java
malenkov
parents: 3350
diff changeset
   142
        }
3350
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   143
    }
100ac73bfe6e 6864297: Right-to-left oriented JScrollPane is aligned to the wrong direction while resizing the container
malenkov
parents:
diff changeset
   144
}