./test/java/awt/event/HierarchyEvent/AncestorResized/AncestorResized.java

Print this page
rev 296 : Ensure that ANCESTOR_RECEIVED event will be generated and then catched by the test.

*** 117,137 **** frame.add(components[i]); } // ... and start resizing robot.mousePress( InputEvent.BUTTON1_MASK ); ! robot.mouseMove(bounds.x + bounds.width + 20, bounds.y + bounds.height + 15); Util.waitForIdle(robot); if (ancestorResizedCounter == 0) { robot.mouseRelease( InputEvent.BUTTON1_MASK ); AncestorResized.fail("No ANCESTOR_RESIZED events received."); return; } robot.mouseRelease( InputEvent.BUTTON1_MASK ); AncestorResized.pass(); }//End init() --- 117,143 ---- frame.add(components[i]); } // ... and start resizing robot.mousePress( InputEvent.BUTTON1_MASK ); ! ! for (int i = 0; i<20; i++) ! { ! robot.mouseMove(bounds.x + bounds.width + i, bounds.y + bounds.height + i); Util.waitForIdle(robot); + } if (ancestorResizedCounter == 0) { robot.mouseRelease( InputEvent.BUTTON1_MASK ); AncestorResized.fail("No ANCESTOR_RESIZED events received."); return; } robot.mouseRelease( InputEvent.BUTTON1_MASK ); + Sysout.println("ANCESTOR_RESIZED event received" + ancestorResizedCounter + " times"); + AncestorResized.pass(); }//End init()