From c27f0b37024b8a991512ad8d0856821804bb3692 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 19 Jan 2013 20:05:48 +0100 Subject: TestSwingAWTRobotUsageBeforeJOGLInitBug411: Fix 'chicken egg' init problem w/ AWTRobot, i.e. NativeWindow not yet initialized. Regression since: 50f997557b91a2f014ef0c2ea848c5c326d0cfb2 --- make/scripts/tests.sh | 4 ++-- .../newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 8f8d67c13..80e418056 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -399,7 +399,7 @@ function testawtswt() { # # newt.awt (testawt) # -#testawt com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $* +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 $* @@ -492,7 +492,7 @@ function testawtswt() { # #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT10 $* #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT00 $* -testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $* +#testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $* #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT01 $* #testnoawt com.jogamp.opengl.test.junit.graph.demos.ui.UINewtDemo01 $* #testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01 $* diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java index b165a9693..0e9b6cd88 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java @@ -33,6 +33,8 @@ import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.opengl.test.junit.util.*; import java.lang.reflect.InvocationTargetException; + +import javax.media.nativewindow.NativeWindowFactory; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLProfile; import javax.media.opengl.GLCapabilities; @@ -157,7 +159,16 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { robot = new Robot(); robot.setAutoWaitForIdle(true); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); + // NativeWindow/JOGL is not initialized yet .. + for (int wait=0; wait