summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-22 15:58:11 +0200
committerSven Gothel <[email protected]>2011-10-22 15:58:11 +0200
commit017d4c1dc77c4e7d4b5b4e2f9ca4ad60217a0591 (patch)
treea796d6a564b74ce8402b4ba5762925abf5f2bf18 /src/test/com/jogamp/opengl
parent1e68529642e3e8ac6c88c023a63ac9f4dac184b1 (diff)
Test/Focus: Add sleep for manual focus tests
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java8
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);