diff options
author | Sven Gothel <[email protected]> | 2011-08-30 22:05:19 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-30 22:05:19 +0200 |
commit | f3c58e61ad9b1ad1d1c193d6f538776fb4de1dac (patch) | |
tree | 8e79fcf56e2be9c35999badbced1a83fe01ecfc2 | |
parent | 71b7087455fc23ec640d9d64342aaaaff42d3c7e (diff) |
TestFocus01SwingAWTRobot: Run AWT destruction on AWT-EDT
-rwxr-xr-x | make/scripts/tests.sh | 12 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java | 18 |
2 files changed, 18 insertions, 12 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index d95a75004..98a3207b3 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -54,7 +54,7 @@ function jrun() { # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.NativeWindow" #D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT" #D_ARGS="-Dnewt.debug.EDT" - # D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true" + #D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true -Dnativewindow.debug.X11Util" #D_ARGS="-Dnativewindow.x11.mt-bug=true" #D_ARGS="-Dnativewindow.x11.mt-bug=true -Djogl.debug.DebugGL" #D_ARGS="-Dnativewindow.x11.mt-bug=true -Djogl.debug=all" @@ -139,7 +139,7 @@ function testawtmt() { #testawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES1NEWT $* -testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $* #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $* @@ -187,14 +187,14 @@ testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 #testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper #testawt com.jogamp.opengl.test.junit.newt.TestEventSourceNotAWTBug -#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot +testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot #testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot #testawt com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cSwingAWT -#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02AWT +#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02AWT $* #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT -time 100000 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT -time 100000 @@ -212,10 +212,6 @@ testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $* #testawt $* -#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot -#testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot -#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListAWT $* -# #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT $* 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 e23510e25..4a8be69ba 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java @@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.newt; import org.junit.Assert; import org.junit.AfterClass; +import org.junit.Assume; import java.awt.AWTException; import java.awt.BorderLayout; @@ -88,7 +89,7 @@ public class TestFocus01SwingAWTRobot extends UITestCase { private void testFocus01ProgrFocusImpl(Robot robot) throws AWTException, InvocationTargetException, InterruptedException { - ArrayList eventCountAdapters = new ArrayList(); + ArrayList<EventCountAdapter> eventCountAdapters = new ArrayList<EventCountAdapter>(); // Create a window. GLWindow glWindow1 = GLWindow.create(glCaps); @@ -117,8 +118,8 @@ public class TestFocus01SwingAWTRobot extends UITestCase { eventCountAdapters.add(newtCanvasAWTFA); // Add the canvas to a frame, and make it all visible. - JFrame frame1 = new JFrame("Swing AWT Parent Frame: " - + glWindow1.getTitle()); + final JFrame frame1 = new JFrame("Swing AWT Parent Frame: " + + glWindow1.getTitle()); AWTFocusAdapter frame1FA = new AWTFocusAdapter("frame1"); frame1.addFocusListener(frame1FA); frame1.getContentPane().add(newtCanvasAWT, BorderLayout.CENTER); @@ -178,7 +179,16 @@ public class TestFocus01SwingAWTRobot extends UITestCase { // Shutdown the test. animator.stop(); - frame1.dispose(); + try { + javax.swing.SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + frame1.setVisible(false); + frame1.dispose(); + }}); + } catch( Throwable throwable ) { + throwable.printStackTrace(); + Assume.assumeNoException( throwable ); + } glWindow1.destroy(); } |