--- old/test/java/awt/TextField/ScrollSelectionTest/ScrollSelectionTest.java 2016-02-11 12:22:00.124086715 +0530 +++ new/test/java/awt/TextField/ScrollSelectionTest/ScrollSelectionTest.java 2016-02-11 12:21:59.892086715 +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,30 @@ { tf.setText("abcdefghijklmnopqrstuvwxyz"); frame.add(tf); + frame.setLayout(new FlowLayout()); tf.select(0, 20); String[] instructions = { - "INSTRUCTIONS:", + "INSTRUCTIONS: There are 3 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 te TextField text", + "Move mouse towards left or right with selecting text", + "Move mouse away outside the bounds of TextField", + "No flicker should be observed.", + ".", + "Test3: Over scroll on right", + "Mouse press on te TextField text", + "Move mouse towards Right", + "Move mouse away outside the bounds of TextField", + "Observe TextField text does not get scrolled towards left", + "as there is no need to scroll", }; Sysout.createDialogWithInstructions( instructions ); @@ -67,11 +76,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()