diff options
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java | 4 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java index 2afe2ebd2..13653b907 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java @@ -57,7 +57,7 @@ import com.jogamp.opengl.test.junit.util.*; public class TestFocus01SwingAWTRobot extends UITestCase { static int width, height; - static long durationPerTest = 800; + static long durationPerTest = 10; static long awtWaitTimeout = 1000; static GLCapabilities glCaps; @@ -130,6 +130,8 @@ public class TestFocus01SwingAWTRobot extends UITestCase { frame1.setVisible(true); Assert.assertTrue(AWTRobotUtil.toFront(robot, frame1)); + Thread.sleep(durationPerTest); // manual testing + int wait=0; while(wait<awtWaitTimeout/100 && glWindow1.getTotalFPSFrames()<1) { Thread.sleep(awtWaitTimeout/10); wait++; } System.err.println("Frames for initial setVisible(true): "+glWindow1.getTotalFPSFrames()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java index 3d2cdc84c..56b08b52a 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java @@ -58,6 +58,7 @@ import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; public class TestFocus02SwingAWTRobot extends UITestCase { static int width, height; + static long durationPerTest = 10; static long awtWaitTimeout = 1000; static GLCapabilities glCaps; @@ -165,6 +166,8 @@ public class TestFocus02SwingAWTRobot extends UITestCase { animator1.start(); AWTRobotUtil.assertRequestFocusAndWait(robot, jFrame1, jFrame1, jFrame1FA, null); + Thread.sleep(durationPerTest); // manual testing + // Button Outer Focus Thread.sleep(100); // allow event sync System.err.println("FOCUS AWT Button Outer request"); @@ -285,6 +288,11 @@ public class TestFocus02SwingAWTRobot extends UITestCase { public static void main(String args[]) throws IOException, AWTException, InterruptedException, InvocationTargetException { + for(int i=0; i<args.length; i++) { + if(args[i].equals("-time")) { + durationPerTest = atoi(args[++i]); + } + } if(true) { String tstname = TestFocus02SwingAWTRobot.class.getName(); org.junit.runner.JUnitCore.main(tstname); |