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

Reviewed-by: phh
Backport-of: f5beafa53f93a6ec03278dfd7063d7b3b0b9d241
  • Loading branch information
caojoshua authored and Paul Hohensee committed Nov 11, 2022
1 parent f6d869f commit 2f509c7
Showing 1 changed file with 20 additions and 9 deletions.
Expand Up @@ -26,15 +26,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 @@ -64,9 +73,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 @@ -135,8 +146,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 2f509c7

@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.