From f70e28c8f73c57eb8aa391ef26e1b2357878268a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 30 Oct 2012 17:41:06 +0100 Subject: Fix AWTRobotUtil.keyType(..): 'c0' start count must be outside of retry loop; also wait a few ms after key action --- src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java index 06e172a5d..f48033ae0 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java +++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java @@ -29,6 +29,7 @@ package com.jogamp.opengl.test.junit.util; import jogamp.newt.WindowImplAccess; + import java.lang.reflect.InvocationTargetException; import java.awt.AWTException; import java.awt.Component; @@ -212,7 +213,7 @@ public class AWTRobotUtil { throw new RuntimeException("Neither AWT nor NEWT: "+obj); } - if(null == robot) { + if(null == robot) { if(null!=comp) { javax.swing.SwingUtilities.invokeAndWait(new Runnable() { public void run() { @@ -342,6 +343,7 @@ public class AWTRobotUtil { int tc = 0; int j; final long t0 = System.currentTimeMillis(); + final int c0 = null!=counter ? counter.getCount() : 0; for(j=0; 1 > tc && j tc; wait++) { -- cgit v1.2.3