--- old/test/java/awt/TextField/ScrollSelectionTest/ScrollSelectionTest.java 2016-03-08 20:39:06.797357600 +0530 +++ new/test/java/awt/TextField/ScrollSelectionTest/ScrollSelectionTest.java 2016-03-08 20:39:06.553357600 +0530 @@ -23,23 +23,17 @@ /* test - @bug 4118621 - @summary tests that selected text isn't scrolled when there is enough room. - @author prs: area=TextField + @bug 4118621 8149636 + @summary Test the selection scrolling in TextField. @run applet/manual=yesno ScrollSelectionTest.html */ -/** - * ScrollSelectionTest.java - * - * summary: tests that selected text isn't scrolled when there is enough room. - */ - import java.applet.Applet; import java.awt.Dialog; import java.awt.Frame; import java.awt.TextField; import java.awt.TextArea; +import java.awt.FlowLayout; public class ScrollSelectionTest extends Applet { @@ -51,15 +45,23 @@ { tf.setText("abcdefghijklmnopqrstuvwxyz"); frame.add(tf); + frame.setLayout(new FlowLayout()); tf.select(0, 20); String[] instructions = { - "INSTRUCTIONS:", + "INSTRUCTIONS: There are 2 Tests", + "Test1: Text visibility with Scroll", "This is a test for a win32 specific problem", - "If you see all the letters from 'a' to 'z' and", + "If you see all the letters from 'a' to 'z' and", "letters from 'a' to 't' are selected then test passes.", - "You may have to activate the frame to see the selection" - + " highlighted (e.g. by clicking on frame's title)." + "You may have to activate the frame to see the selection", + "highlighted (e.g. by clicking on frame's title).", + ".", + "Test2: Flicker with selection scroll", + "Mouse press on the TextField text.", + "Move mouse towards left or right with selecting text.", + "Move mouse away outside the bounds of TextField.", + "No flicker should be observed.", }; Sysout.createDialogWithInstructions( instructions ); @@ -67,11 +69,11 @@ public void start () { - setSize (300,300); + setSize (300, 500); setVisible(true); frame.setVisible(true); - frame.setBounds (400, 0, 300, 300); + frame.setBounds (400, 0, 400, 300); }// start()