Skip to content
Permalink
Browse files
8196300: java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java t…
…imes out

Reviewed-by: jdv
  • Loading branch information
prsadhuk committed Apr 27, 2021
1 parent 694aced commit 7db9330c5879285c08a185e5431ccffc1173ee72
Showing with 15 additions and 11 deletions.
  1. +0 −1 test/jdk/ProblemList.txt
  2. +15 −10 test/jdk/java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java
@@ -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
@@ -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
@@ -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")) {

1 comment on commit 7db9330

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 7db9330 Apr 27, 2021

Please sign in to comment.