aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNEWTWindowAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWT.java3
5 files changed, 8 insertions, 9 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java b/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java
index f5278a542..138d30823 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java
@@ -33,6 +33,7 @@ import java.util.ArrayList ;
import javax.media.opengl.GLProfile ;
+import org.junit.After;
import org.junit.Assert ;
import org.junit.BeforeClass ;
import org.junit.Test ;
@@ -317,6 +318,11 @@ public abstract class BaseNewtEventModifiers extends UITestCase {
_testMouseListener = new TestMouseListener() ;
}
+ @After
+ public void afterTest() throws Exception {
+ clearKeyboadAndMouse();
+ }
+
////////////////////////////////////////////////////////////////////////////
// Following both methods are mandatory to deal with SWT's requirement
// to run the SWT event dispatch on the TK thread - which must be the main thread on OSX.
@@ -340,6 +346,7 @@ public abstract class BaseNewtEventModifiers extends UITestCase {
eventDispatch(); eventDispatch(); eventDispatch();
Thread.sleep( MS_ROBOT_POST_TEST_DELAY ) ;
eventDispatch(); eventDispatch(); eventDispatch();
+ _testMouseListener.clear();
}
_testMouseListener.setModifierCheckEnabled( true ) ;
@@ -685,6 +692,7 @@ public abstract class BaseNewtEventModifiers extends UITestCase {
_releaseModifiers() ;
_escape() ;
Thread.sleep( MS_ROBOT_POST_TEST_DELAY ) ;
+ _testMouseListener.clear();
}
////////////////////////////////////////////////////////////////////////////
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java
index ee634e1c6..a847ca671 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java
@@ -77,14 +77,12 @@ public class TestNewtEventModifiersAWTCanvas extends BaseNewtEventModifiers {
AWTRobotUtil.assertRequestFocusAndWait(null, canvas, canvas, null, null); // programmatic
Assert.assertNotNull(_robot);
AWTRobotUtil.requestFocus(_robot, canvas, false); // within unit framework, prev. tests (TestFocus02SwingAWTRobot) 'confuses' Windows keyboard input
- clearKeyboadAndMouse();
}
////////////////////////////////////////////////////////////////////////////
@AfterClass
public static void afterClass() throws Exception {
- clearKeyboadAndMouse();
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
_testFrame.dispose() ;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNEWTWindowAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNEWTWindowAWT.java
index 880d378a4..71191c863 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNEWTWindowAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNEWTWindowAWT.java
@@ -64,14 +64,12 @@ public class TestNewtEventModifiersNEWTWindowAWT extends BaseNewtEventModifiers
AWTRobotUtil.assertRequestFocusAndWait(null, _glWindow, _glWindow, null, null); // programmatic
Assert.assertNotNull(_robot);
AWTRobotUtil.requestFocus(_robot, _glWindow, false); // within unit framework, prev. tests (TestFocus02SwingAWTRobot) 'confuses' Windows keyboard input
- clearKeyboadAndMouse();
}
////////////////////////////////////////////////////////////////////////////
@AfterClass
public static void afterClass() throws Exception {
- clearKeyboadAndMouse();
_glWindow.destroy();
}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java
index 47826d127..968d1af79 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java
@@ -90,14 +90,12 @@ public class TestNewtEventModifiersNewtCanvasAWT extends BaseNewtEventModifiers
AWTRobotUtil.requestFocus(_robot, _glWindow, false); // within unit framework, prev. tests (TestFocus02SwingAWTRobot) 'confuses' Windows keyboard input
_glWindow.addMouseListener( _testMouseListener ) ;
- clearKeyboadAndMouse();
}
////////////////////////////////////////////////////////////////////////////
@AfterClass
public static void afterClass() throws Exception {
- clearKeyboadAndMouse();
SwingUtilities.invokeAndWait( new Runnable() {
public void run() {
_testFrame.dispose() ;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWT.java
index 0ac9328a6..002134216 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWT.java
@@ -133,15 +133,12 @@ public class TestNewtEventModifiersNewtCanvasSWT extends BaseNewtEventModifiers
eventDispatch2xImpl();
_glWindow.addMouseListener( _testMouseListener ) ;
- clearKeyboadAndMouse();
}
////////////////////////////////////////////////////////////////////////////
@AfterClass
public static void afterClass() throws Exception {
- clearKeyboadAndMouse();
-
_glWindow.destroy() ;
try {