From 01d2f02624e6e6c6877fbf3eb5b830f49c3e06af Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 24 Jun 2013 17:12:02 +0200 Subject: Apply workaround of Java7 AWT Robot.waitForIdle()/EDT bug for all Robot.waitForIdle() calls. See commit 8f3b2a4cc14be60681a7bfae0507655cc5702836 --- .../newt/event/TestNewtKeyCodeModifiersAWT.java | 6 +++--- .../test/junit/newt/event/TestNewtKeyCodesAWT.java | 2 +- .../newt/event/TestNewtKeyEventAutoRepeatAWT.java | 8 ++++---- .../junit/newt/event/TestNewtKeyEventOrderAWT.java | 8 ++++---- .../opengl/test/junit/util/AWTRobotUtil.java | 24 +++++++++++++--------- 5 files changed, 26 insertions(+), 22 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java index c1b572df3..19d739a75 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java @@ -164,7 +164,7 @@ public class TestNewtKeyCodeModifiersAWT extends UITestCase { keyAdapter.reset(); AWTRobotUtil.newtKeyPress(0, robot, true, keyCode, 10); // press keyCode AWTRobotUtil.newtKeyPress(0, robot, false, keyCode, 100); // release keyCode - robot.waitForIdle(); + AWTRobotUtil.waitForIdle(robot); for(int j=0; j < 100 && keyAdapter.getQueueSize() < 2; j++) { // wait until events are collected robot.delay(100); } @@ -173,7 +173,7 @@ public class TestNewtKeyCodeModifiersAWT extends UITestCase { AWTRobotUtil.newtKeyPress(0, robot, true, keyCode, 10); // press keyCode AWTRobotUtil.newtKeyPress(0, robot, false, keyCode, 10); // release keyCode AWTRobotUtil.newtKeyPress(0, robot, false, modifierKey, 100); // release MOD - robot.waitForIdle(); + AWTRobotUtil.waitForIdle(robot); for(int j=0; j < 100 && keyAdapter.getQueueSize() < 2+4; j++) { // wait until events are collected robot.delay(100); } @@ -212,7 +212,7 @@ public class TestNewtKeyCodeModifiersAWT extends UITestCase { AWTRobotUtil.newtKeyPress(0, robot, false, m2k, 10); // release MOD AWTRobotUtil.newtKeyPress(0, robot, false, m1k, 10); // release MOD - robot.waitForIdle(); + AWTRobotUtil.waitForIdle(robot); for(int j=0; j < 100 && keyAdapter.getQueueSize() < 4+4; j++) { // wait until events are collected robot.delay(100); } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java index a5f47e870..e1254ae6d 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java @@ -210,7 +210,7 @@ public class TestNewtKeyCodesAWT extends UITestCase { break; } eventCount++; - robot.waitForIdle(); + AWTRobotUtil.waitForIdle(robot); } for(int j=0; j < 20 && keyAdapter.getQueueSize() < eventCount; j++) { // wait until events are collected robot.delay(100); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java index b6c15231c..508ad2cbf 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java @@ -162,9 +162,9 @@ public class TestNewtKeyEventAutoRepeatAWT extends UITestCase { for(int i=0; i