Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8196300: java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java times out #3686

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -265,7 +265,6 @@ sun/java2d/SunGraphics2D/SourceClippingBlitTest/SourceClippingBlitTest.java 8196
sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh 8221451 linux-all
java/awt/FullScreen/DisplayChangeVITest/DisplayChangeVITest.java 8169469 windows-all
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8197796 generic-all
java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java 8196300 windows-all
java/awt/print/PrinterJob/PSQuestionMark.java 7003378 generic-all
java/awt/print/PrinterJob/GlyphPositions.java 7003378 generic-all
java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 7100044 macosx-all,linux-all
Expand Down
25 changes: 15 additions & 10 deletions test/jdk/java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -69,27 +69,32 @@ public void dispose() {

public void performTest() {
robot.waitForIdle();
robot.delay(200);
robot.delay(1000);
Point loc = textArea.getLocationOnScreen();
Rectangle textAreaBounds = new Rectangle();
textArea.getBounds(textAreaBounds);

// Move mouse at center in first row of TextArea.
robot.mouseMove(loc.x + textAreaBounds.width / 2, loc.y + 5);
robot.waitForIdle();
robot.delay(500);

// Perform selection by scrolling to left from end of char sequence.
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseMove(loc.x - 5, loc.y + 5);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
robot.delay(500);

// Perform double click on beginning word of TextArea
robot.mouseMove(loc.x + 5, loc.y + 5);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.delay(100);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.delay(100);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
robot.delay(500);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(500);
robot.waitForIdle();

if (textArea.getSelectedText().contentEquals("5678")) {
Expand Down