test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java
author serb
Wed, 27 Feb 2019 18:46:55 -0800
changeset 54231 e4813eded7cb
parent 47216 71c04702a3d5
permissions -rw-r--r--
8213110: Remove the use of applets in automatic tests Reviewed-by: prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     1
/*
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
     2
 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     4
 *
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     8
 *
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    13
 * accompanied this code).
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    14
 *
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 425
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 425
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 425
diff changeset
    21
 * questions.
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    22
 */
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    23
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    24
/*
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    25
  @test
39056
d99e63b6d962 8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents: 31442
diff changeset
    26
  @key headful
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    27
  @bug       6314575
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    28
  @summary   Tests that previosly focused owned window doesn't steal focus when an owner's component requests focus.
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    29
  @library   ../../regtesthelpers
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    30
  @build     Util
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    31
  @run       main ActualFocusedWindowBlockingTest
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    32
*/
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    33
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    34
import java.awt.*;
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    35
import java.awt.event.*;
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    36
import test.java.awt.regtesthelpers.Util;
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    37
54231
e4813eded7cb 8213110: Remove the use of applets in automatic tests
serb
parents: 47216
diff changeset
    38
public class ActualFocusedWindowBlockingTest {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    39
    Robot robot = Util.createRobot();
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    40
    Frame owner = new Frame("Owner Frame");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    41
    Window win = new Window(owner);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    42
    Frame frame = new Frame("Auxiliary Frame");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    43
    Button fButton = new Button("frame button") {public String toString() {return "Frame_Button";}};
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    44
    Button wButton = new Button("window button") {public String toString() {return "Window_Button";}};
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    45
    Button aButton = new Button("auxiliary button") {public String toString() {return "Auxiliary_Button";}};
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    46
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    47
    public static void main(String[] args) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    48
        ActualFocusedWindowBlockingTest app = new ActualFocusedWindowBlockingTest();
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    49
        app.init();
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    50
        app.start();
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    51
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    52
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    53
    public void init() {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    54
        Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    55
                public void eventDispatched(AWTEvent e) {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    56
                    System.out.println("--> " + e);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    57
                }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    58
            }, FocusEvent.FOCUS_EVENT_MASK | WindowEvent.WINDOW_FOCUS_EVENT_MASK);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    59
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    60
        owner.add(fButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    61
        win.add(wButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    62
        frame.add(aButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    63
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    64
        owner.setName("OWNER_FRAME");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    65
        win.setName("OWNED_WINDOW");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    66
        frame.setName("AUX_FRAME");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    67
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    68
        tuneAndShowWindows(new Window[] {owner, win, frame});
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    69
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    70
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    71
    public void start() {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    72
        if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    73
            System.out.println("No testing on Motif. Test passed.");
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    74
            return;
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    75
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    76
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    77
        System.out.println("\nTest started:\n");
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    78
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    79
        // Test 1.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    80
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    81
        clickOnCheckFocus(wButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    82
        clickOnCheckFocus(aButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    83
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    84
        Util.clickOnComp(fButton, robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    85
        if (!testFocused(fButton)) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    86
            throw new TestFailedException("The owner's component [" + fButton + "] couldn't be focused by click");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    87
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    88
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    89
        // Test 2.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    90
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    91
        clickOnCheckFocus(wButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    92
        clickOnCheckFocus(aButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    93
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    94
        fButton.requestFocus();
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
    95
        Util.waitForIdle(robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    96
        if (!testFocused(fButton)) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    97
            throw new TestFailedException("The owner's component [" + fButton + "] couldn't be focused by request");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    98
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
    99
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   100
        // Test 3.
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   101
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   102
        clickOnCheckFocus(wButton);
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   103
        clickOnCheckFocus(aButton);
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   104
        clickOnCheckFocus(fButton);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   105
        clickOnCheckFocus(aButton);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   106
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   107
        Util.clickOnTitle(owner, robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   108
        if (!testFocused(fButton)) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   109
            throw new TestFailedException("The owner's component [" + fButton + "] couldn't be focused as the most recent focus owner");
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   110
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   111
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   112
        System.out.println("Test passed.");
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   113
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   114
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   115
    void tuneAndShowWindows(Window[] arr) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   116
        int y = 0;
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   117
        for (Window w: arr) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   118
            w.setLayout(new FlowLayout());
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   119
            w.setBounds(100, y, 400, 150);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   120
            w.setBackground(Color.blue);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   121
            w.setVisible(true);
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   122
            y += 200;
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   123
            Util.waitForIdle(robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   124
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   125
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   126
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   127
    void clickOnCheckFocus(Component c) {
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   128
        if (c instanceof Frame) {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   129
            Util.clickOnTitle((Frame)c, robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   130
        } else {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   131
            Util.clickOnComp(c, robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   132
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   133
        if (!testFocused(c)) {
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   134
            throw new TestErrorException(c + "couldn't get focus by click.");
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   135
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   136
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   137
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   138
    boolean testFocused(Component c) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   139
        for (int i=0; i<10; i++) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   140
            if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() == c) {
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   141
                return true;
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   142
            }
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   143
            Util.waitForIdle(robot);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   144
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   145
        return false;
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   146
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   147
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   148
    // Thrown when the behavior being verified is found wrong.
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   149
    class TestFailedException extends RuntimeException {
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   150
        TestFailedException(String msg) {
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   151
            super("Test failed: " + msg);
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   152
        }
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   153
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   154
425
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   155
    // Thrown when an error not related to the behavior being verified is encountered.
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   156
    class TestErrorException extends RuntimeException {
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   157
        TestErrorException(String msg) {
89b44fab010f 6616792: five AWT focus regression tests should be fixed
ant
parents: 423
diff changeset
   158
            super("Unexpected error: " + msg);
423
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   159
        }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   160
    }
1c607ab74068 6680135: A number of test/closed/java/awt/Focus/* tests should be opened
ant
parents:
diff changeset
   161
}