From: Timothy W. <tw...@us...> - 2006-02-02 11:42:19
|
Update of /cvsroot/abbot/abbot/test/abbot/tester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31859/test/abbot/tester Modified Files: RobotTest.java Log Message: Fix sample w/ComponentLocation Index: RobotTest.java =================================================================== RCS file: /cvsroot/abbot/abbot/test/abbot/tester/RobotTest.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** RobotTest.java 4 Jan 2006 16:26:09 -0000 1.98 --- RobotTest.java 2 Feb 2006 11:42:11 -0000 1.99 *************** *** 872,875 **** --- 872,888 ---- flag.flag); } + + public void testSampleComponentLocation() { + JLabel label = new JLabel(getName()) { + public void paintComponent(Graphics g) { + g.setColor(Color.red); + g.fillRect(0, 0, getWidth(), getHeight()); + } + }; + label.setOpaque(true); + showFrame(label); + assertEquals("Sample of component location failed", + Color.red, robot.sample(label, label.getWidth()/2, label.getHeight()/2)); + } /** Create a new test case with the given name. */ |