Skip to content

Commit

Permalink
8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalIntern…
Browse files Browse the repository at this point in the history
…alFrameTest.java

Backport-of: f5beafa53f93a6ec03278dfd7063d7b3b0b9d241
  • Loading branch information
caojoshua authored and Paul Hohensee committed Oct 11, 2022
1 parent dde80ab commit 4be6963
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -136,7 +136,6 @@ java/awt/Focus/KeyEventForBadFocusOwnerTest/KeyEventForBadFocusOwnerTest.java 81
java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java 8194753 linux-all,macosx-all
java/awt/Focus/NoAutotransferToDisabledCompTest/NoAutotransferToDisabledCompTest.java 7152980 macosx-all
java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java 8028701 macosx-all,linux-all
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java 8159599 macosx-all
java/awt/Focus/TypeAhead/TestFocusFreeze.java 8198622,6447537 macosx-all,windows-all,linux-all
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096 macosx-all
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
Expand Down
Expand Up @@ -27,15 +27,24 @@
* @bug 6385277
* @summary Tests that override redirect window gets activated on click.
* @author anton.tarasov@sun.com: area=awt.focus
* @library ../../regtesthelpers
* @build Util
* @run main SimpleWindowActivationTest
*/
import java.awt.*;
import java.awt.event.*;
import java.util.concurrent.Callable;
import javax.swing.SwingUtilities;
import test.java.awt.regtesthelpers.Util;

import java.awt.AWTEvent;
import java.awt.Button;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Label;
import java.awt.Point;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.AWTEventListener;
import java.awt.event.FocusEvent;
import java.awt.event.InputEvent;
import java.awt.event.WindowEvent;

public class SimpleWindowActivationTest {

Expand Down Expand Up @@ -65,9 +74,11 @@ public void eventDispatched(AWTEvent e) {

createAndShowWindow();
robot.waitForIdle();
robot.delay(500);

createAndShowFrame();
robot.waitForIdle();
robot.delay(500);

// click on Frame
clickOn(getClickPoint(frame));
Expand Down Expand Up @@ -136,8 +147,8 @@ static void clickOn(Point point) {
robot.mouseMove(point.x, point.y);
robot.waitForIdle();

robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);

robot.waitForIdle();
}
Expand Down

1 comment on commit 4be6963

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.