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: serb, aivanov
  • Loading branch information
Alexander Zvegintsev committed Apr 16, 2022
1 parent 21de4e5 commit f5beafa
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 @@ -133,7 +133,6 @@ java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-a
java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java 6986252 macosx-all
java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java 8194753 linux-all,macosx-all
java/awt/Focus/NoAutotransferToDisabledCompTest/NoAutotransferToDisabledCompTest.java 7152980 macosx-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/ToFrontFocusTest/ToFrontFocus.java 7156130 linux-all
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096 macosx-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 All @@ -59,9 +68,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 @@ -130,8 +141,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

3 comments on commit f5beafa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on f5beafa Sep 19, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on f5beafa Sep 19, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-f5beafa5 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit f5beafa5 from the openjdk/jdk repository.

The commit being backported was authored by Alexander Zvegintsev on 16 Apr 2022 and was reviewed by Sergey Bylokhov and Alexey Ivanov.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-f5beafa5:GoeLin-backport-f5beafa5
$ git checkout GoeLin-backport-f5beafa5
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-f5beafa5

Please sign in to comment.