aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-07-24 21:59:51 +0200
committerSven Gothel <[email protected]>2015-07-24 21:59:51 +0200
commitc47dab67985a23040effea36d69356737e40d4e5 (patch)
tree7eddc29ffb355a051a7159377d15fc2ae05b110b
parentcc3aa4f6e72171162476ee3e858c1949c4b577f2 (diff)
Fix TestBug1146GLContextDialogToolTipAWT / AWTRobotUtil.mouseClick(..) use BUTTON1_MASK instead of BUTTON1_DOWN_MASK
-rw-r--r--make/scripts/tests.sh4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1146GLContextDialogToolTipAWT.java9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java5
3 files changed, 10 insertions, 8 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 530bcb0e0..a71457f45 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -535,7 +535,7 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT4 $*
#testswt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2SWT3 $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextWithJTabbedPaneAWT $*
-testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedExternalContextAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedExternalContextAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableDeadlockAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestPBufferDeadlockAWT $*
@@ -594,7 +594,7 @@ testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedExternalContextAWT $
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestNEWTCloseX11DisplayBug565 $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestAWTCloseX11DisplayBug565 $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestBug1146GLContextDialogToolTipAWT $*
+testawt com.jogamp.opengl.test.junit.jogl.acore.TestBug1146GLContextDialogToolTipAWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLWindow01NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLJPanel01AWT $*
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1146GLContextDialogToolTipAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1146GLContextDialogToolTipAWT.java
index 656cb47bd..42646c07e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1146GLContextDialogToolTipAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1146GLContextDialogToolTipAWT.java
@@ -139,7 +139,8 @@ public class TestBug1146GLContextDialogToolTipAWT extends UITestCase {
final AbstractButton approveButton = findButton(0, fileChooser, approveButtonText);
if( null != approveButton ) {
approveButtonPos = approveButton.getLocationOnScreen();
- approveButtonPos.translate(2, 2);
+ final Dimension approveButtonSize = approveButton.getSize();
+ approveButtonPos.translate(approveButtonSize.width/2, approveButtonSize.height/2);
System.err.println("OK Button: "+approveButton.getClass().getSimpleName()+"; "+approveButton+", "+approveButtonPos);
} else {
System.err.println("OK Button: NULL");
@@ -149,7 +150,8 @@ public class TestBug1146GLContextDialogToolTipAWT extends UITestCase {
final AbstractButton cancelButton = findButton(0, fileChooser, cancelButtonText);
if( null != approveButton ) {
cancelButtonPos = cancelButton.getLocationOnScreen();
- cancelButtonPos.translate(2, 2);
+ final Dimension cancelButtonSize = cancelButton.getSize();
+ cancelButtonPos.translate(cancelButtonSize.width/2, cancelButtonSize.height/2);
System.err.println("CANCEL Button: "+cancelButton.getClass().getSimpleName()+"; "+cancelButton+", "+cancelButtonPos);
} else {
cancelButtonPos = null;
@@ -219,7 +221,8 @@ public class TestBug1146GLContextDialogToolTipAWT extends UITestCase {
Assert.assertEquals(1, glelc2.initCount);
}
- @Test
+
+ @Test(timeout=180000) // TO 3 min
public void test01() {
final GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
for (int i = 0; i < NB_TEST; i++) {
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 bdb03ba1d..477b761bd 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
@@ -39,7 +39,6 @@ import java.awt.EventQueue;
import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.Robot;
-import java.awt.event.InputEvent;
import com.jogamp.nativewindow.NativeWindow;
import com.jogamp.nativewindow.NativeWindowFactory;
@@ -596,8 +595,8 @@ public class AWTRobotUtil {
mouseMove(robot, pos, moveIter, moveDelay);
robot.delay(actionDelay);
- robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
- robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+ robot.mousePress(java.awt.event.InputEvent.BUTTON1_MASK);
+ robot.mouseRelease(java.awt.event.InputEvent.BUTTON1_MASK);
robot.delay(actionDelay);
}