diff options
author | Sven Gothel <[email protected]> | 2019-04-09 23:29:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-04-09 23:29:43 +0200 |
commit | 0a0673f71d50715999aabd815803c7c383e28ec3 (patch) | |
tree | 2cce2a987e0f406704bee13751d158e8e1430d46 /src/test | |
parent | bb588480a2978da6b8ffec821821f19eb6a83e40 (diff) |
Cleanup AWTRobotUtil 2: Align signatures of waitForVisible(..) and waitForRealized(..)
Diffstat (limited to 'src/test')
95 files changed, 452 insertions, 447 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLProfile0XBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLProfile0XBase.java index 75d588f8e..add8113bc 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLProfile0XBase.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLProfile0XBase.java @@ -46,7 +46,7 @@ import com.jogamp.common.os.Platform; import com.jogamp.common.util.PropertyAccess; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.JoglVersion; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; @FixMethodOrder(MethodSorters.NAME_ASCENDING) @@ -872,8 +872,8 @@ public abstract class GLProfile0XBase extends UITestCase { glWindow.setSize(128, 128); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); glWindow.display(); Thread.sleep(100); @@ -885,8 +885,8 @@ public abstract class GLProfile0XBase extends UITestCase { glWindow.getContext().isCreatedWithARBMethod()); } glWindow.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, false, null)); } protected void validateOnlineOffscreen(final String requestedProfile, final GLCapabilitiesImmutable caps) 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 a736a481a..402358899 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 @@ -133,8 +133,8 @@ public class TestBug1146GLContextDialogToolTipAWT extends UITestCase { public void run() { try { - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(fileChooser, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(fileChooser, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas1, true, null)); final Point approveButtonPos; final AbstractButton approveButton = findButton(0, fileChooser, approveButtonText); @@ -174,7 +174,7 @@ public class TestBug1146GLContextDialogToolTipAWT extends UITestCase { } catch (final InvocationTargetException e) { e.printStackTrace(); } - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas2, true, null)); } if( null != cancelButtonPos ) { AWTRobotUtil.mouseClick(robot, cancelButtonPos, MOVE_ITER, MOVE_DELAY, ACTION_DELAY); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java index d8900b44e..4960196cb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java @@ -206,7 +206,7 @@ public class TestFBOMix2DemosES2NEWT extends UITestCase { Assert.assertFalse(animator.isAnimating()); Assert.assertFalse(animator.isStarted()); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOffThreadSharedContextMix2DemosES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOffThreadSharedContextMix2DemosES2NEWT.java index 6c1e4b812..4de889940 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOffThreadSharedContextMix2DemosES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOffThreadSharedContextMix2DemosES2NEWT.java @@ -258,7 +258,7 @@ public class TestFBOOffThreadSharedContextMix2DemosES2NEWT extends UITestCase { fbod2.destroy(); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOnThreadSharedContext1DemoES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOnThreadSharedContext1DemoES2NEWT.java index 1886d3d2a..1fe059a90 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOnThreadSharedContext1DemoES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOOnThreadSharedContext1DemoES2NEWT.java @@ -231,7 +231,7 @@ public class TestFBOOnThreadSharedContext1DemoES2NEWT extends UITestCase { fbod1.destroy(); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java index ff05b63a1..4432fad3e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java @@ -50,8 +50,8 @@ import com.jogamp.newt.event.WindowEvent; import com.jogamp.newt.event.WindowUpdateEvent; import com.jogamp.opengl.GLAutoDrawableDelegate; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.QuitAdapter; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.Animator; @@ -83,8 +83,8 @@ public class TestGLAutoDrawableDelegateNEWT extends UITestCase { Assert.assertNotNull(window); window.setSize(640, 400); window.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); System.out.println("Window: "+window.getClass().getName()); final GLDrawable drawable = factory.createGLDrawable(window); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java index cddf002cf..844788c8a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java @@ -55,8 +55,8 @@ import com.jogamp.opengl.GLAutoDrawableDelegate; import com.jogamp.opengl.JoglVersion; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; /** @@ -97,8 +97,8 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase { Assert.assertNotNull(window); window.setSize(widthStep*szStep, heightStep*szStep); window.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); System.out.println("Window: "+window.getClass().getName()); // Check caps of NativeWindow config w/o GL diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java index b97de9975..06041cc37 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.java @@ -32,6 +32,7 @@ import java.awt.Dimension; import java.awt.Frame; import java.io.IOException; +import com.jogamp.junit.util.JunitTracer; import com.jogamp.nativewindow.CapabilitiesImmutable; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLCapabilities; @@ -134,8 +135,8 @@ public class TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT extends UITestCase { Assume.assumeNoException( throwable ); } - Assert.assertTrue(AWTRobotUtil.waitForVisible(glad, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glad, true)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(glad, true, null)); + Assert.assertTrue(GLTestUtil.waitForRealized(glad, true, null)); System.out.println("Window: "+glad.getClass().getName()); // Check caps of NativeWindow config w/o GL @@ -346,7 +347,7 @@ public class TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT extends UITestCase { } } if(waitForKey) { - UITestCase.waitForKey("Start"); + JunitTracer.waitForKey("Start"); } org.junit.runner.JUnitCore.main(TestGLAutoDrawableGLCanvasOnOffscrnCapsAWT.class.getName()); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java index b95f6d97e..9c429873a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java @@ -51,8 +51,8 @@ import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.JoglVersion; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; /** @@ -91,8 +91,8 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase { Assert.assertNotNull(glad); glad.setSize(widthStep*szStep, heightStep*szStep); glad.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glad, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glad, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glad, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glad, true, null)); System.out.println("Window: "+glad.getClass().getName()); // Check caps of NativeWindow config w/o GL diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java index 1e05cf276..9909d7dd0 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT.java @@ -57,7 +57,7 @@ import com.jogamp.newt.awt.NewtCanvasAWT; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.JoglVersion; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -146,8 +146,8 @@ public class TestGLAutoDrawableNewtCanvasAWTOnOffscrnCapsAWT extends UITestCase Assume.assumeNoException( throwable ); } - Assert.assertTrue(AWTRobotUtil.waitForVisible(glad, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glad, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glad, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glad, true, null)); System.out.println("Window: "+glad.getClass().getName()); // Check caps of NativeWindow config w/o GL diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java index b11b16812..8d16ee356 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer01GLCanvasAWT.java @@ -171,8 +171,8 @@ public class TestOffscreenLayer01GLCanvasAWT extends UITestCase { frame1.setSize(frameSize0); setupFrameAndShow(frame1, glc); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true, null)); Assert.assertEquals(true, glc.isOffscreenLayerSurfaceEnabled()); final GLAnimatorControl animator1 = new Animator(glc); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java index d49c1e545..a5abd9466 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestOffscreenLayer02NewtCanvasAWT.java @@ -57,7 +57,7 @@ import com.jogamp.newt.opengl.util.NEWTDemoListener; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.opengl.test.junit.newt.parenting.NewtAWTReparentingKeyAdapter; import com.jogamp.opengl.test.junit.newt.parenting.NewtReparentingKeyAdapter; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.Animator; @@ -177,8 +177,8 @@ public class TestOffscreenLayer02NewtCanvasAWT extends UITestCase { frame1.setSize(frameSize0); setupFrameAndShow(frame1, newtCanvasAWT1); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true)); + Assert.assertEquals(true, NewtTestUtil.waitForRealized(glWindow1, true, null)); + Assert.assertEquals(true, NewtTestUtil.waitForVisible(glWindow1, true, null)); Assert.assertEquals(newtCanvasAWT1.getNativeWindow(),glWindow1.getParent()); Assert.assertEquals(true, newtCanvasAWT1.isOffscreenLayerSurfaceEnabled()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java index 7e39b890c..fa4ff013a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java @@ -118,7 +118,7 @@ public class TestSharedContextListAWT extends UITestCase { public void run() { frame.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); return glCanvas; } @@ -161,11 +161,11 @@ public class TestSharedContextListAWT extends UITestCase { public void run() { try { f1.dispose(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc1, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc1, false, null)); f2.dispose(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc2, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc2, false, null)); f3.dispose(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc3, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc3, false, null)); } catch (final Throwable t) { throw new RuntimeException(t); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java index 37aaa33b4..263e78def 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java @@ -39,7 +39,7 @@ import com.jogamp.opengl.GLOffscreenAutoDrawable; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears; @@ -106,8 +106,8 @@ public class TestSharedContextListNEWT extends UITestCase { animator.add(glWindow); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); glWindow.setPosition(x, y); return glWindow; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java index e84ae4997..095b03207 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT2.java @@ -38,7 +38,7 @@ import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import org.junit.Assert; @@ -108,8 +108,8 @@ public class TestSharedContextListNEWT2 extends UITestCase { animator.start(); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); glWindow.setPosition(x, y); return glWindow; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java index 2ea167979..356c639d9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java @@ -40,9 +40,9 @@ import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.GLAutoDrawableDelegate; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1; @@ -97,7 +97,8 @@ public class TestSharedContextVBOES1NEWT extends UITestCase { dummyDrawable.setRealized(true); sharedDrawable = new GLAutoDrawableDelegate(dummyDrawable, null, null, true /*ownDevice*/, null) { }; Assert.assertNotNull(sharedDrawable); - Assert.assertTrue(AWTRobotUtil.waitForRealized(sharedDrawable, true)); + final GLAutoDrawable obj = sharedDrawable; + Assert.assertTrue(GLTestUtil.waitForRealized(obj, true, null)); sharedGears = new GearsES1(); Assert.assertNotNull(sharedGears); @@ -135,8 +136,8 @@ public class TestSharedContextVBOES1NEWT extends UITestCase { animator.add(glWindow); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(glWindow, true)); MiscUtils.dumpSharedGLContext("Master Context", sharedDrawable.getContext()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java index 0b8a69576..2a14b9a78 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java @@ -41,6 +41,7 @@ import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; @@ -136,18 +137,18 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase { Thread.sleep(1000/60*10); // wait ~10 frames giving a chance to create (blocking until master share is valid) - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -224,9 +225,9 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(GLTestUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(GLTestUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(GLTestUtil.waitForRealized(c3, false, null)); } @Test @@ -283,18 +284,18 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase { Thread.sleep(1000/60*10); // wait ~10 frames giving a chance to create (blocking until master share is valid) - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(GLTestUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -375,9 +376,9 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(GLTestUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(GLTestUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(GLTestUtil.waitForRealized(c3, false, null)); } static long duration = 1000; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3b.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3b.java index 8bbce1fba..4ee11e465 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3b.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3b.java @@ -127,18 +127,18 @@ public class TestSharedContextVBOES2AWT3b extends UITestCase { Thread.sleep(1000/60*10); // wait ~10 frames giving a chance to create (blocking until master share is valid) - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -186,9 +186,9 @@ public class TestSharedContextVBOES2AWT3b extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false, null)); } @Test @@ -236,18 +236,18 @@ public class TestSharedContextVBOES2AWT3b extends UITestCase { Thread.sleep(1000/60*10); // wait ~10 frames giving a chance to create (blocking until master share is valid) - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -299,9 +299,9 @@ public class TestSharedContextVBOES2AWT3b extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false, null)); } static long duration = 1000; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java index 2819e05de..721139a41 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT0.java @@ -39,7 +39,7 @@ import com.jogamp.opengl.GLContext; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -92,8 +92,8 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase { animator.add(glWindow); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); glWindow.display(); Assert.assertTrue(GLTestUtil.waitForContextCreated(glWindow, true)); Assert.assertTrue("Gears not initialized", gears.waitForInit(true)); @@ -185,8 +185,8 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase { } f3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); { final List<GLContext> ctx1Shares = ctx1.getCreatedShares(); @@ -206,8 +206,8 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase { try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); } f2.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); { final List<GLContext> ctx1Shares = ctx1.getCreatedShares(); @@ -227,8 +227,8 @@ public class TestSharedContextVBOES2NEWT0 extends UITestCase { try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); } f1.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); { final List<GLContext> ctx1Shares = ctx1.getCreatedShares(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java index 102a01dff..710345e49 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT1.java @@ -38,7 +38,7 @@ import com.jogamp.opengl.GLDrawableFactory; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -109,7 +109,8 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { sharedDrawable = GLDrawableFactory.getFactory(glp).createDummyAutoDrawable(null, true /* createNewDevice */, caps, null); } Assert.assertNotNull(sharedDrawable); - Assert.assertTrue(AWTRobotUtil.waitForRealized(sharedDrawable, true)); + final GLAutoDrawable obj = sharedDrawable; + Assert.assertTrue(GLTestUtil.waitForRealized(obj, true, null)); sharedGears = new GearsES2(); Assert.assertNotNull(sharedGears); @@ -150,8 +151,8 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { animator.add(glWindow); animator.start(); glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(glWindow, true)); final GLContext sharedMasterContext = sharedDrawable.getContext(); @@ -192,14 +193,14 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { f1.destroy(); f2.destroy(); f3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); releaseShared(); @@ -230,14 +231,14 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { f1.destroy(); f2.destroy(); f3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); releaseShared(); @@ -263,14 +264,14 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { f1.destroy(); f2.destroy(); f3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); releaseShared(); @@ -301,14 +302,14 @@ public class TestSharedContextVBOES2NEWT1 extends UITestCase { f1.destroy(); f2.destroy(); f3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); releaseShared(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java index 4606c37db..c87835af8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT2.java @@ -38,7 +38,7 @@ import com.jogamp.opengl.GLContext; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -129,32 +129,32 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase { animator.add(f3); f3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); f1.setVisible(true); // kick off f1 GLContext .. and hence allow f2 + f3 creation - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -203,12 +203,12 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase { f2.destroy(); f3.destroy(); } - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); } @Test @@ -251,31 +251,31 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase { a3.start(); f3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); f1.setVisible(true); // kicks off f1 GLContext .. and hence gears of f2 + f3 completion - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -330,12 +330,12 @@ public class TestSharedContextVBOES2NEWT2 extends UITestCase { f2.destroy(); f3.destroy(); } - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); } static long duration = 1000; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT3.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT3.java index 5eef967dc..959dcbf82 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT3.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT3.java @@ -38,9 +38,9 @@ import com.jogamp.opengl.GLContext; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; @@ -130,23 +130,23 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { animator.add(f2); f2.setVisible(true); // shall wait until f1 is ready - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); f1.setVisible(true); // kicks off f1 GLContext .. and hence gears of f2 + f3 completion - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); @@ -158,8 +158,8 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { animator.add(f3); f3.setVisible(true); // shall wait until f1 is ready - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -218,12 +218,12 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { f3.destroy(); try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); } } - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); animator.stop(); } @@ -268,23 +268,23 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { a2.start(); f2.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); f1.setVisible(true); // test pending creation of f2 - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); @@ -298,8 +298,8 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { a3.start(); f3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -366,12 +366,12 @@ public class TestSharedContextVBOES2NEWT3 extends UITestCase { f3.destroy(); try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); } } - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); } static long duration = 1000; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT4.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT4.java index a89f1bcd0..6748f28fa 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT4.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT4.java @@ -41,7 +41,7 @@ import com.jogamp.opengl.GLContext; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -133,32 +133,32 @@ public class TestSharedContextVBOES2NEWT4 extends UITestCase { }); f3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, false)); f1.setVisible(true); // kick off f1 GLContext .. and hence allow f2 + f3 creation - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -204,12 +204,12 @@ public class TestSharedContextVBOES2NEWT4 extends UITestCase { f2.destroy(); f1.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f1, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f2, false)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(f3, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(f3, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null)); } static long duration = 1000; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java index 19bd85c7d..86f3e345e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java @@ -117,18 +117,18 @@ public class TestAnimatorGLJPanel01AWT extends UITestCase { f3.setVisible(true); } } ); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -169,9 +169,9 @@ public class TestAnimatorGLJPanel01AWT extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false, null)); } @Test @@ -219,18 +219,18 @@ public class TestAnimatorGLJPanel01AWT extends UITestCase { f3.setVisible(true); } } ); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -277,9 +277,9 @@ public class TestAnimatorGLJPanel01AWT extends UITestCase { } }}); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false, null)); } static long duration = 3*500; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java index f7d383d68..cb0b0d43d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java @@ -34,7 +34,7 @@ import com.jogamp.opengl.GLCapabilities; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.util.Animator; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; @@ -109,18 +109,18 @@ public class TestAnimatorGLWindow01NEWT extends UITestCase { c2.setVisible(true); c3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -154,9 +154,9 @@ public class TestAnimatorGLWindow01NEWT extends UITestCase { c2.destroy(); c3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c3, false, null)); } @Test @@ -192,18 +192,18 @@ public class TestAnimatorGLWindow01NEWT extends UITestCase { Assert.assertEquals(true, a3.isAnimating()); c3.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c1, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c2, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c2, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c3, true, null)); + Assert.assertTrue(NewtTestUtil.waitForVisible(c3, true, null)); Assert.assertTrue(GLTestUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); @@ -243,9 +243,9 @@ public class TestAnimatorGLWindow01NEWT extends UITestCase { c2.destroy(); c3.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c1, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c2, false, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(c3, false, null)); } static long duration = 3*500; // ms diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java index b2608303a..117779b3a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java @@ -361,7 +361,7 @@ public abstract class ExclusiveContextBase00 extends UITestCase { // Destroy GLWindows for(int i=0; i<drawableCount; i++) { destroyGLAutoDrawableVisible(drawables[i]); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawables[i], false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawables[i], false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase10.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase10.java index 1908d1ec2..8f94cfa78 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase10.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase10.java @@ -183,7 +183,7 @@ public abstract class ExclusiveContextBase10 extends UITestCase { // Destroy GLWindows for(int i=0; i<drawableCount; i++) { destroyGLAutoDrawableVisible(drawables[i]); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawables[i], false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawables[i], false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/GLContextDrawableSwitchBase1.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/GLContextDrawableSwitchBase1.java index 712679982..5cb802c35 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/GLContextDrawableSwitchBase1.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/GLContextDrawableSwitchBase1.java @@ -208,11 +208,11 @@ public abstract class GLContextDrawableSwitchBase1 extends UITestCase { if( GLADType.GLCanvasOnscreen == gladType || GLADType.GLCanvasOffscreen == gladType ) { setFrameVisible(frame); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); } else if( GLADType.GLWindow == gladType ) { ((GLWindow)glad).setVisible(true); } - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glad, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glad, true, null)); Assert.assertNotNull(glad.getContext()); Assert.assertTrue(glad.isRealized()); @@ -270,13 +270,13 @@ public abstract class GLContextDrawableSwitchBase1 extends UITestCase { } if( GLADType.GLCanvasOnscreen == gladType || GLADType.GLCanvasOffscreen == gladType ) { destroyFrame(frame); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false, null)); } else if( GLADType.GLWindow == gladType ) { glad.destroy(); } else if( GLADType.GLOffscreen == gladType ) { glad.destroy(); } - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glad, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glad, false, null)); Assert.assertEquals(1, glelTracker.initCount); Assert.assertTrue(1 <= glelTracker.reshapeCount); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch01NEWT.java index a872d692d..393bff746 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch01NEWT.java @@ -51,7 +51,7 @@ import com.jogamp.opengl.util.GLDrawableUtil; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.QuitAdapter; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -89,8 +89,8 @@ public class TestGLContextDrawableSwitch01NEWT extends UITestCase { window.setPosition(x, y); window.setSize(width, height); window.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); final GLDrawable drawable = factory.createGLDrawable(window); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch10NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch10NEWT.java index 2fe56dbfe..cd9defd83 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch10NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/glels/TestGLContextDrawableSwitch10NEWT.java @@ -50,8 +50,8 @@ import com.jogamp.opengl.GLEventListenerState; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; -import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.GLEventListenerCounter; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.QuitAdapter; import com.jogamp.opengl.test.junit.util.UITestCase; @@ -104,8 +104,8 @@ public class TestGLContextDrawableSwitch10NEWT extends UITestCase { window.setPosition(x, y); window.setSize(width, height); window.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); final GLDrawable drawable = factory.createGLDrawable(window); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1225EventQueueInterruptedAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1225EventQueueInterruptedAWT.java index 92dd7e344..6469a26d8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1225EventQueueInterruptedAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1225EventQueueInterruptedAWT.java @@ -171,9 +171,9 @@ public class TestBug1225EventQueueInterruptedAWT extends UITestCase { frame.getContentPane().add(panel, BorderLayout.CENTER); setVisible(frame, true); if( useGL ) { - Assert.assertTrue(AWTRobotUtil.waitForRealized(glc, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(glc, true, null)); } - Assert.assertTrue(AWTRobotUtil.waitForRealized(icomp, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(icomp, true, null)); final InterruptableLoop loop = new InterruptableLoop(icomp, glc); final Thread thread = new Thread(loop); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1245JTabbedPanelCrashAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1245JTabbedPanelCrashAWT.java index bc52238bb..f041d5d01 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1245JTabbedPanelCrashAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug1245JTabbedPanelCrashAWT.java @@ -172,7 +172,7 @@ public class TestBug1245JTabbedPanelCrashAWT extends UITestCase { System.err.println("XXX SetVisible ON XXX"); frame.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); for(int i=0; i<views.length; i++) { System.err.printf("View "+i+": "+views[i]+",%n "+views[i].getGLCanvasStats()+"%n%n"); } @@ -203,7 +203,7 @@ public class TestBug1245JTabbedPanelCrashAWT extends UITestCase { System.err.println("XXX SetVisible OFF XXX"); frame.dispose(); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false, null)); System.err.println("XXX POST.DISPOSE: "+glelCounter); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug572AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug572AWT.java index 1250ab6f2..5d8713c86 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug572AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug572AWT.java @@ -110,8 +110,8 @@ public class TestBug572AWT extends UITestCase { realizeAction.run(); // Wait until it's displayable after issuing initial setVisible(true) on current thread (non AWT-EDT)! - Assert.assertTrue("GLCanvas didn't become visible", AWTRobotUtil.waitForVisible(glCanvas, true)); - Assert.assertTrue("GLCanvas didn't become realized", AWTRobotUtil.waitForRealized(glCanvas, true)); // implies displayable + Assert.assertTrue("GLCanvas didn't become visible", AWTRobotUtil.waitForVisible(glCanvas, true, null)); + Assert.assertTrue("GLCanvas didn't become realized", AWTRobotUtil.waitForRealized(glCanvas, true, null)); // implies displayable } System.err.println("XXXX-0 "+glCanvas.getDelegatedDrawable().isRealized()+", "+glCanvas); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug664GLCanvasSetVisibleSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug664GLCanvasSetVisibleSwingAWT.java index 2b6d8233f..16e61246a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug664GLCanvasSetVisibleSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug664GLCanvasSetVisibleSwingAWT.java @@ -187,8 +187,8 @@ public class TestBug664GLCanvasSetVisibleSwingAWT extends UITestCase { System.err.println("XXXX Visible Part 1/3"); frameCount = 0; setFrameVisible(top[0], true); - Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true)); - Assert.assertTrue("Component didn't become realized", AWTRobotUtil.waitForRealized(glc, true)); + Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true, null)); + Assert.assertTrue("Component didn't become realized", AWTRobotUtil.waitForRealized(glc, true, null)); anim.setUpdateFPSFrames(60, System.err); anim.start(); @@ -200,7 +200,7 @@ public class TestBug664GLCanvasSetVisibleSwingAWT extends UITestCase { System.err.println("XXXXX Invisible Part 2/3"); setComponentVisible(glc, false); - Assert.assertTrue("Component didn't become invisible", AWTRobotUtil.waitForVisible(glc, false)); + Assert.assertTrue("Component didn't become invisible", AWTRobotUtil.waitForVisible(glc, false, null)); final int frameCountT0 = frameCount; anim.resetFPSCounter(); @@ -215,7 +215,7 @@ public class TestBug664GLCanvasSetVisibleSwingAWT extends UITestCase { System.err.println("XXXX Visible Part 3/3"); setComponentVisible(glc, true); - Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true)); + Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true, null)); anim.resetFPSCounter(); while( anim.getTotalFPSDuration() < durationPerTest ) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816GLCanvasFrameHoppingB849B889AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816GLCanvasFrameHoppingB849B889AWT.java index 7758a525e..7f0233915 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816GLCanvasFrameHoppingB849B889AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816GLCanvasFrameHoppingB849B889AWT.java @@ -155,8 +155,8 @@ public class TestBug816GLCanvasFrameHoppingB849B889AWT extends UITestCase { frame2.setVisible(true); } }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); dumpGLCanvasStats(glCanvas); if(manual) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816JTabbedPanelVisibilityB849B878AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816JTabbedPanelVisibilityB849B878AWT.java index 1aeaccb81..541cceac0 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816JTabbedPanelVisibilityB849B878AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816JTabbedPanelVisibilityB849B878AWT.java @@ -118,8 +118,8 @@ public class TestBug816JTabbedPanelVisibilityB849B878AWT extends UITestCase { System.err.println("XXX SetVisible ON XXX GLCanvas on Panel1("+id(panel1)+")"); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); dumpGLCanvasStats(glCanvas); if(manual) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos01AWT.java index c33b2e5ba..383bb3760 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos01AWT.java @@ -248,10 +248,10 @@ public class TestBug816OSXCALayerPos01AWT extends UITestCase { } frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); if( twoCanvas ) { - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas2, true, null)); } animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos02AWT.java index 5e20bb3f7..15b4c6126 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos02AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos02AWT.java @@ -101,8 +101,8 @@ public class TestBug816OSXCALayerPos02AWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03aB729AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03aB729AWT.java index ac3903ec6..d24cccdc6 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03aB729AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03aB729AWT.java @@ -115,8 +115,8 @@ public class TestBug816OSXCALayerPos03aB729AWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03bB849AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03bB849AWT.java index 62526420f..1ec6dae2c 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03bB849AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03bB849AWT.java @@ -121,8 +121,8 @@ public class TestBug816OSXCALayerPos03bB849AWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03cB849AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03cB849AWT.java index 3d46b5315..03bff669e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03cB849AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos03cB849AWT.java @@ -123,8 +123,8 @@ public class TestBug816OSXCALayerPos03cB849AWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04aAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04aAWT.java index 74046e8a1..4d1e8157e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04aAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04aAWT.java @@ -88,7 +88,7 @@ public class TestBug816OSXCALayerPos04aAWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); final Dialog dialog = new Dialog(frame, "Bug 816 AWT Top-Level Dialog"); dialog.setLayout(new BorderLayout()); @@ -100,8 +100,8 @@ public class TestBug816OSXCALayerPos04aAWT extends UITestCase { dialog.setSize(width/2, height/2); dialog.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(dialog, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(dialog, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04bAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04bAWT.java index 704b589f3..dddfcabf8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04bAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPos04bAWT.java @@ -88,7 +88,7 @@ public class TestBug816OSXCALayerPos04bAWT extends UITestCase { frame.setSize(width, height); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); final JDialog dialog = new JDialog(frame, "Bug 816 AWT Top-Level JDialog"); dialog.setLayout(new BorderLayout()); @@ -100,8 +100,8 @@ public class TestBug816OSXCALayerPos04bAWT extends UITestCase { dialog.setSize(width/2, height/2); dialog.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(dialog, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(dialog, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); animator.start(); Assert.assertTrue(animator.isStarted()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestGLJPanelTextureStateAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestGLJPanelTextureStateAWT.java index 46ae20765..e37a29b4f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestGLJPanelTextureStateAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestGLJPanelTextureStateAWT.java @@ -263,8 +263,8 @@ public class TestGLJPanelTextureStateAWT extends UITestCase { throwable.printStackTrace(); Assume.assumeNoException( throwable ); } - Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true)); - Assert.assertTrue("Component didn't become realized", AWTRobotUtil.waitForRealized(glc, true)); + Assert.assertTrue("Component didn't become visible", AWTRobotUtil.waitForVisible(glc, true, null)); + Assert.assertTrue("Component didn't become realized", AWTRobotUtil.waitForRealized(glc, true, null)); Thread.sleep(100); setFrameSize(frame, true, glc_sz2); System.err.println("window resize pos/siz: "+glc.getX()+"/"+glc.getY()+" "+glc.getSurfaceWidth()+"x"+glc.getSurfaceHeight()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java index 503878c65..83826bacc 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java @@ -283,8 +283,8 @@ public class TestGearsES2AWT extends UITestCase { } frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); final float[] hasSurfacePixelScale1 = glCanvas.getCurrentSurfaceScale(new float[2]); System.err.println("HiDPI PixelScale: "+reqSurfacePixelScale[0]+"x"+reqSurfacePixelScale[1]+" (req) -> "+ diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java index a41e4b9e7..bbcb936f3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelAWT.java @@ -219,8 +219,8 @@ public class TestGearsES2GLJPanelAWT extends UITestCase { frame.pack(); frame.setVisible(true); } } ) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel, true, null)); final float[] minSurfacePixelScale = glJPanel.getMinimumSurfaceScale(new float[2]); final float[] maxSurfacePixelScale = glJPanel.getMaximumSurfaceScale(new float[2]); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java index 43417c317..33a5d7134 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java @@ -395,7 +395,7 @@ public class TestGearsES2NEWT extends UITestCase { glWindow2[0] = null; } if( NativeWindowFactory.isAWTAvailable() ) { - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NewtCanvasAWT.java index 77c4bf8f3..08f71a679 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NewtCanvasAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NewtCanvasAWT.java @@ -50,6 +50,7 @@ import com.jogamp.newt.opengl.GLWindow; import com.jogamp.newt.opengl.util.NEWTDemoListener; import com.jogamp.opengl.test.junit.util.AWTRobotUtil; import com.jogamp.opengl.test.junit.util.MiscUtils; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.AnimatorBase; @@ -312,8 +313,8 @@ public class TestGearsES2NewtCanvasAWT extends UITestCase { frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, NewtTestUtil.waitForRealized(glWindow, true, null)); if( useAnimator ) { animator.setUpdateFPSFrames(60, showFPS ? System.err : null); @@ -355,7 +356,7 @@ public class TestGearsES2NewtCanvasAWT extends UITestCase { } }); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java index 976025c14..0549d9c20 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java @@ -143,7 +143,7 @@ public class TestRedSquareES2NEWT extends UITestCase { Assert.assertFalse(animator.isStarted()); glWindow.destroy(); if( NativeWindowFactory.isAWTAvailable() ) { - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/javafx/TestNewtCanvasJFXGLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/javafx/TestNewtCanvasJFXGLn.java index 27ce49af4..ac5e75b0f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/javafx/TestNewtCanvasJFXGLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/javafx/TestNewtCanvasJFXGLn.java @@ -377,7 +377,7 @@ public class TestNewtCanvasJFXGLn extends UITestCase { } if( null != glWindow1 ) { - Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow1, awtRobotWaitAction, true)); + Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow1, true, awtRobotWaitAction)); System.err.println("GLWindow LOS.0: "+glWindow1.getLocationOnScreen(null)); glWindow1.addWindowListener(new WindowAdapter() { public void windowResized(final WindowEvent e) { 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 b899c426c..1d0f00122 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 @@ -214,7 +214,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { AWTRobotUtil.toFrontAndRequestFocus(robot, frame); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawable, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(drawable, true, null)); drawable.addGLEventListener(new GearsES2()); @@ -268,7 +268,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { final GLWindow win0 = GLWindow.create(caps); win0.setSize(100,100); win0.setVisible(true); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(win0, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(win0, true, null)); final Screen screen = win0.getScreen(); final RectangleImmutable screenBoundsInWinU = screen.getViewportInWindowUnits(); @@ -283,7 +283,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase { runTestGL(newtCanvasAWT, win1); win0.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(win0, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(win0, false, null)); Assert.assertEquals(false, win0.isNativeValid()); Assert.assertEquals(true, anim.isAnimating()); // due to newtCanvasAWT/win1 diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashForm.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashForm.java index eec31b064..da33392e3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashForm.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashForm.java @@ -228,7 +228,7 @@ public class TestBug672NewtCanvasSWTSashForm extends UITestCase { shell.open(); } }); - Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, awtRobotWaitAction, true)); + Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, true, awtRobotWaitAction)); Assert.assertNotNull( canvas1.getNativeWindow() ); System.err.println("NW chosen: "+glWindow.getDelegatedWindow().getChosenCapabilities()); @@ -272,7 +272,7 @@ public class TestBug672NewtCanvasSWTSashForm extends UITestCase { canvas1.dispose(); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashFormComposite.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashFormComposite.java index fdd6d6458..e4f2912f9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashFormComposite.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestBug672NewtCanvasSWTSashFormComposite.java @@ -235,7 +235,7 @@ public class TestBug672NewtCanvasSWTSashFormComposite extends UITestCase { shell.open(); } }); - Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, awtRobotWaitAction, true)); + Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, true, awtRobotWaitAction)); Assert.assertNotNull( canvas1.getNativeWindow() ); System.err.println("NW chosen: "+glWindow.getDelegatedWindow().getChosenCapabilities()); @@ -279,7 +279,7 @@ public class TestBug672NewtCanvasSWTSashFormComposite extends UITestCase { canvas1.dispose(); glWindow.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTBug628ResizeDeadlockAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTBug628ResizeDeadlockAWT.java index 22053483e..5bfaae3fa 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTBug628ResizeDeadlockAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTBug628ResizeDeadlockAWT.java @@ -349,7 +349,7 @@ public class TestNewtCanvasSWTBug628ResizeDeadlockAWT extends UITestCase { dsc.shell.setSize( 400, 450 ) ; dsc.shell.open() ; } } ); - Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, dsc.awtRobotWaitAction, true)); + Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow, true, dsc.awtRobotWaitAction)); AWTRobotUtil.requestFocus(robot, glWindow, false); AWTRobotUtil.setMouseToClientLocation(robot, glWindow, 50, 50); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java index 0d9effb30..30b34577b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java @@ -194,7 +194,7 @@ public class TestNewtCanvasSWTGLn extends UITestCase { canvas1.setNEWTChild(glWindow1); } - Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow1, awtRobotWaitAction, true)); + Assert.assertTrue("GLWindow didn't become visible natively!", AWTRobotUtil.waitForRealized(glWindow1, true, awtRobotWaitAction)); System.err.println("GLWindow LOS.0: "+glWindow1.getLocationOnScreen(null)); System.err.println("NewtCanvasSWT LOS.0: "+canvas1.getNativeWindow().getLocationOnScreen(null)); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTBug643AsyncExec.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTBug643AsyncExec.java index 9b2e46d44..8a5df90c4 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTBug643AsyncExec.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTBug643AsyncExec.java @@ -241,7 +241,7 @@ public class TestSWTBug643AsyncExec extends UITestCase { if( glWindowPreVisible ) { newtDisplay.setEDTUtil(new SWTEDTUtil(newtDisplay, dsc.display)); // Especially Windows requires creation access via same thread! glWindow.setVisible(true); - AWTRobotUtil.waitForRealized(glWindow, true); + AWTRobotUtil.waitForRealized(glWindow, true, null); Thread.sleep(120); // let it render a bit, before consumed by SWT } glad = glWindow; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java index c880b1f13..3ce6113f9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java @@ -165,9 +165,9 @@ public class TestTiledPrintingGearsAWT extends TiledPrintingAWTBase { frame.pack(); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas2, true, null)); animator.setUpdateFPSFrames(60, System.err); animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsNewtAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsNewtAWT.java index 48f1dbdb1..0c111328d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsNewtAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsNewtAWT.java @@ -170,9 +170,9 @@ public class TestTiledPrintingGearsNewtAWT extends TiledPrintingAWTBase { frame.pack(); frame.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(canvas2, true, null)); animator.setUpdateFPSFrames(60, System.err); animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java index 41d438f5d..5ad629fe0 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java @@ -211,9 +211,9 @@ public class TestTiledPrintingGearsSwingAWT extends TiledPrintingAWTBase { frame.setVisible(true); } } ) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel2, true, null)); animator.setUpdateFPSFrames(60, System.err); animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT2.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT2.java index b069e8dba..2727e2792 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT2.java @@ -206,8 +206,8 @@ public class TestTiledPrintingGearsSwingAWT2 extends TiledPrintingAWTBase { frame.setVisible(true); } } ) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true, null)); if( null != animator ) { animator.setUpdateFPSFrames(60, System.err); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingNIOImageSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingNIOImageSwingAWT.java index 3b48ccf6b..c8912f524 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingNIOImageSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingNIOImageSwingAWT.java @@ -225,9 +225,9 @@ public class TestTiledPrintingNIOImageSwingAWT extends UITestCase { frame.setVisible(true); } } ) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glJPanel2, true, null)); // paint offscreen: array 72dpi ARGB { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java index 201d60a78..d2ce4e19b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java @@ -119,8 +119,8 @@ public class TestGLReadBufferUtilTextureIOWrite01AWT extends UITestCase { throwable.printStackTrace(); Assume.assumeNoException( throwable ); } - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true, null)); Assert.assertEquals(JAWTUtil.isOffscreenLayerSupported() && offscreenLayer, glc.isOffscreenLayerSurfaceEnabled()); animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java index a7196150c..3ac5f3618 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java @@ -144,8 +144,8 @@ public class TestGLReadBufferUtilTextureIOWrite02AWT extends UITestCase { throwable.printStackTrace(); Assume.assumeNoException( throwable ); } - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true, null)); Assert.assertEquals(JAWTUtil.isOffscreenLayerSupported() && offscreenLayer, glc.isOffscreenLayerSurfaceEnabled()); animator.start(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java index da6cf66ac..ac8b3f730 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java @@ -113,8 +113,9 @@ public class TestCloseNewtAWT extends UITestCase { frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(newtWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + final Object obj = newtWindow; + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(obj, true, null)); final TestUtil.WindowClosingListener closingListener = AWTRobotUtil.addClosingListener(frame); Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true, closingListener)); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java index 4426a087b..ef0cf9de7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java @@ -147,8 +147,8 @@ public class TestDisplayLifecycle02NEWT extends UITestCase { // destruction.. ref count down, but keep all window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(screen,window.getScreen()); Assert.assertEquals(0,Display.getActiveDisplayNumber()); @@ -195,8 +195,8 @@ public class TestDisplayLifecycle02NEWT extends UITestCase { System.err.println("duration: "+window.getTotalFPSDuration()); window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(screen,window.getScreen()); Assert.assertEquals(false,window.isNativeValid()); @@ -300,7 +300,7 @@ public class TestDisplayLifecycle02NEWT extends UITestCase { // destruction ... window1.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window1, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window1, false, null)); Assert.assertNotNull(window1.getScreen()); Assert.assertEquals(false,window1.isNativeValid()); @@ -317,8 +317,8 @@ public class TestDisplayLifecycle02NEWT extends UITestCase { // destruction window2.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window2, false)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window2, false, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertNotNull(window2.getScreen()); Assert.assertEquals(false,window2.isNativeValid()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestMultipleNewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestMultipleNewtCanvasAWT.java index 2220fbcd9..1817334e8 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestMultipleNewtCanvasAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestMultipleNewtCanvasAWT.java @@ -135,9 +135,9 @@ public class TestMultipleNewtCanvasAWT extends UITestCase { } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent2, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent2, true, null)); animator.start(); @@ -157,9 +157,9 @@ public class TestMultipleNewtCanvasAWT extends UITestCase { frame.dispose(); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent1, false)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent2, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent1, false, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(openGLComponent2, false, null)); } static int atoi(final String a) { diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowAndPointerIconNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowAndPointerIconNEWT.java index d613f7d94..4dcc843f8 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowAndPointerIconNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowAndPointerIconNEWT.java @@ -126,7 +126,7 @@ public class TestWindowAndPointerIconNEWT extends SingletonJunitCase { glWindow.destroy(); if( NativeWindowFactory.isAWTAvailable() ) { - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java index 68872b740..f21ef9725 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java @@ -69,8 +69,8 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { frame.validate(); frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); // // close with op: DO_NOTHING_ON_CLOSE -> NOP (default) @@ -130,8 +130,8 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { frame.validate(); frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); // // close with op: DO_NOTHING_ON_CLOSE -> NOP / HIDE (default) @@ -143,7 +143,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { Thread.sleep(300); Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false, closingListener)); // hide - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false)); // hide -> invisible + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false, null)); // hide -> invisible Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(false, frame.isVisible()); Assert.assertEquals(true, glCanvas.isValid()); @@ -153,8 +153,8 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { public void run() { frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(true, frame.isVisible()); @@ -167,7 +167,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op); Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true, closingListener)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, false, null)); Assert.assertEquals(false, frame.isDisplayable()); Assert.assertEquals(false, glCanvas.isValid()); Assert.assertEquals(false, glCanvas.isDisplayable()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java index 2661be4a5..0c8f42769 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java @@ -76,8 +76,8 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase { frame.validate(); frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(true, frame.isVisible()); Assert.assertEquals(true, newtCanvas.isValid()); @@ -96,7 +96,7 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase { Thread.sleep(300); Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false, awtClosingListener)); // hide - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false)); // hide -> invisible + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, false, null)); // hide -> invisible Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(false, frame.isVisible()); Assert.assertEquals(true, newtCanvas.isValid()); @@ -113,8 +113,8 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase { public void run() { frame.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(true, frame.isVisible()); @@ -131,7 +131,7 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase { Thread.sleep(300); Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true, awtClosingListener)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, false, null)); Assert.assertEquals(false, frame.isDisplayable()); Assert.assertEquals(false, frame.isVisible()); Assert.assertEquals(false, newtCanvas.isValid()); 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 8cc266147..8f58ec7d9 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 @@ -73,9 +73,9 @@ public class TestNewtEventModifiersAWTCanvas extends BaseNewtEventModifiers { _testFrame.setVisible( true ) ; } }) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(_testFrame, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(canvas, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(canvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(_testFrame, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(canvas, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(canvas, true, null)); AWTRobotUtil.assertRequestFocusAndWait(null, canvas, canvas, null, null); // programmatic Assert.assertNotNull(_robot); 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 3db61b37b..7b45e590b 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 @@ -40,6 +40,7 @@ import org.junit.runners.MethodSorters; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2; import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.NewtTestUtil; /** * Test whether or not event modifiers are properly delivered by NEWT. @@ -61,8 +62,9 @@ public class TestNewtEventModifiersNEWTWindowAWT extends BaseNewtEventModifiers _glWindow.setPosition(TEST_FRAME_X, TEST_FRAME_Y); _glWindow.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(_glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(_glWindow, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(_glWindow, true, null)); + final GLWindow obj = _glWindow; + Assert.assertTrue(NewtTestUtil.waitForRealized(obj, true, null)); AWTRobotUtil.assertRequestFocusAndWait(null, _glWindow, _glWindow, null, null); // programmatic Assert.assertNotNull(_robot); 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 1d19f527f..373cfcf33 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 @@ -83,9 +83,10 @@ public class TestNewtEventModifiersNewtCanvasAWT extends BaseNewtEventModifiers _testFrame.setVisible( true ) ; } } ) ; - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(_testFrame, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(_glWindow, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(_glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(_testFrame, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(_glWindow, true, null)); + final Object obj = _glWindow; + Assert.assertTrue(AWTRobotUtil.waitForRealized(obj, true, null)); AWTRobotUtil.assertRequestFocusAndWait(null, _glWindow, _glWindow, null, null); // programmatic Assert.assertNotNull(_robot); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java index 0b96f92b9..3f693f12b 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodeModifiersAWT.java @@ -127,7 +127,7 @@ public class TestNewtKeyCodeModifiersAWT extends UITestCase { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); testImpl(glWindow); @@ -253,7 +253,7 @@ public class TestNewtKeyCodeModifiersAWT extends UITestCase { glWindow1KA.setVerbose(false); glWindow.addKeyListener(glWindow1KA); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); // Continuous animation .. final Animator animator = new Animator(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java index 60ea0e570..b450311ce 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyCodesAWT.java @@ -122,7 +122,7 @@ public class TestNewtKeyCodesAWT extends UITestCase { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); testImpl(glWindow); @@ -243,7 +243,7 @@ public class TestNewtKeyCodesAWT extends UITestCase { glWindow1KA.setVerbose(false); glWindow.addKeyListener(glWindow1KA); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); // Continuous animation .. final Animator animator = new Animator(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java index 112a7453d..b2db2f95d 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventAutoRepeatAWT.java @@ -137,7 +137,7 @@ public class TestNewtKeyEventAutoRepeatAWT extends UITestCase { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); testImpl(glWindow); @@ -261,7 +261,7 @@ public class TestNewtKeyEventAutoRepeatAWT extends UITestCase { glWindow1KA.setVerbose(false); glWindow.addKeyListener(glWindow1KA); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); // Continuous animation .. final Animator animator = new Animator(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventOrderAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventOrderAWT.java index e3fa18ae4..d169c0d2e 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventOrderAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyEventOrderAWT.java @@ -126,7 +126,7 @@ public class TestNewtKeyEventOrderAWT extends UITestCase { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); testImpl(glWindow); @@ -210,7 +210,7 @@ public class TestNewtKeyEventOrderAWT extends UITestCase { glWindow1KA.setVerbose(false); glWindow.addKeyListener(glWindow1KA); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); // Continuous animation .. final Animator animator = new Animator(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyPressReleaseUnmaskRepeatAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyPressReleaseUnmaskRepeatAWT.java index e951ba2ee..1083fe93c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyPressReleaseUnmaskRepeatAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtKeyPressReleaseUnmaskRepeatAWT.java @@ -121,7 +121,7 @@ public class TestNewtKeyPressReleaseUnmaskRepeatAWT extends UITestCase { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); testImpl(glWindow); @@ -166,7 +166,7 @@ public class TestNewtKeyPressReleaseUnmaskRepeatAWT extends UITestCase { final SimpleKeyPressRelease simpleKeyPressRelease = new SimpleKeyPressRelease(); glWindow.addKeyListener(simpleKeyPressRelease); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow, true, null)); // Continuous animation .. final Animator animator = new Animator(glWindow); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus01SwingAWTRobot.java index 6cebda97a..95ef55080 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus01SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus01SwingAWTRobot.java @@ -147,8 +147,8 @@ public class TestParentingFocus01SwingAWTRobot extends UITestCase { public void run() { frame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true, null)); AWTRobotUtil.clearAWTFocus(robot); Assert.assertTrue(AWTRobotUtil.toFrontAndRequestFocus(robot, frame1)); @@ -217,7 +217,7 @@ public class TestParentingFocus01SwingAWTRobot extends UITestCase { Assume.assumeNoException( throwable ); } glWindow1.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, false, null)); } static int atoi(final String a) { diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus02SwingAWTRobot.java index 278ff118b..d62bb7a45 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus02SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus02SwingAWTRobot.java @@ -171,8 +171,8 @@ public class TestParentingFocus02SwingAWTRobot extends UITestCase { public void run() { jFrame1.setVisible(true); } } ); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(jFrame1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(jFrame1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true, null)); AWTRobotUtil.clearAWTFocus(robot); Assert.assertTrue(AWTRobotUtil.toFrontAndRequestFocus(robot, jFrame1)); @@ -280,7 +280,7 @@ public class TestParentingFocus02SwingAWTRobot extends UITestCase { } }); glWindow1.destroy(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, false, null)); } @Test diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus03KeyTraversalAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus03KeyTraversalAWT.java index 283fc262a..952c36080 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus03KeyTraversalAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestParentingFocus03KeyTraversalAWT.java @@ -211,8 +211,8 @@ public class TestParentingFocus03KeyTraversalAWT extends UITestCase { frame1.validate(); frame1.setVisible(true); }}); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true, null)); Assert.assertEquals(newtCanvasAWT1.getNativeWindow(),glWindow1.getParent()); AWTRobotUtil.clearAWTFocus(robot); Assert.assertTrue(AWTRobotUtil.toFrontAndRequestFocus(robot, frame1)); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java index ac8d28427..7d213d2b7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java @@ -119,7 +119,7 @@ public class TestScreenMode00bNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java index deab32e03..6d48bbf51 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java @@ -110,7 +110,7 @@ public class TestScreenMode00cNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java index 353856fe5..2dd5439c4 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java @@ -111,7 +111,7 @@ public class TestScreenMode01aNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } @@ -219,7 +219,7 @@ public class TestScreenMode01aNEWT extends UITestCase { Assert.assertEquals(false,window0.isVisible()); Assert.assertEquals(false,window0.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java index 29068afca..c83ea1df0 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java @@ -105,7 +105,7 @@ public class TestScreenMode01bNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } @@ -121,7 +121,7 @@ public class TestScreenMode01bNEWT extends UITestCase { testScreenModeChangeImpl(screen, monitorVp.getX(), monitorVp.getY()); } finally { screen.removeReference(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); } } @@ -141,7 +141,7 @@ public class TestScreenMode01bNEWT extends UITestCase { testScreenModeChangeImpl(screen, monitorVp.getX(), monitorVp.getY()); } finally { screen.removeReference(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); } } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java index 06173a9f1..3ca24009d 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java @@ -105,7 +105,7 @@ public class TestScreenMode01cNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - AWTRobotUtil.waitForRealized(window, false); // don't override a previous assertion failure + AWTRobotUtil.waitForRealized(window, false, null); // don't override a previous assertion failure } } @@ -121,7 +121,7 @@ public class TestScreenMode01cNEWT extends UITestCase { testScreenFullscreenImpl(screen, monitorVp.getX(), monitorVp.getY(), false, null); } finally { screen.removeReference(); - AWTRobotUtil.waitForRealized(screen, false); // don't override a previous assertion failure + AWTRobotUtil.waitForRealized(screen, false, null); // don't override a previous assertion failure } } @@ -141,7 +141,7 @@ public class TestScreenMode01cNEWT extends UITestCase { testScreenFullscreenImpl(screen, monitorVp.getX(), monitorVp.getY(), false, null); } finally { screen.removeReference(); - AWTRobotUtil.waitForRealized(screen, false); // don't override a previous assertion failure + AWTRobotUtil.waitForRealized(screen, false, null); // don't override a previous assertion failure } } @@ -164,7 +164,7 @@ public class TestScreenMode01cNEWT extends UITestCase { testScreenFullscreenImpl(screen, monitorVp.getX()+50, monitorVp.getY()+50, true, monitors); } finally { screen.removeReference(); - AWTRobotUtil.waitForRealized(screen, false); // don't override a previous assertion failure + AWTRobotUtil.waitForRealized(screen, false, null); // don't override a previous assertion failure } } @@ -184,7 +184,7 @@ public class TestScreenMode01cNEWT extends UITestCase { testScreenFullscreenImpl(screen, monitorVp.getX()-50, monitorVp.getY()+50, true, null); } finally { screen.removeReference(); - AWTRobotUtil.waitForRealized(screen, false); // don't override a previous assertion failure + AWTRobotUtil.waitForRealized(screen, false, null); // don't override a previous assertion failure } } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java index 3247b87ac..ae52c98d5 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java @@ -142,7 +142,7 @@ public class TestScreenMode01dNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } @@ -189,7 +189,7 @@ public class TestScreenMode01dNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isRealized()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); @@ -279,7 +279,7 @@ public class TestScreenMode01dNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isRealized()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); @@ -386,7 +386,7 @@ public class TestScreenMode01dNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isRealized()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java index 90952f502..04f89aa22 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java @@ -92,7 +92,7 @@ public class TestScreenMode02aNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } @@ -240,7 +240,7 @@ public class TestScreenMode02aNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java index 11e863217..619116c1e 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java @@ -106,7 +106,7 @@ public class TestScreenMode02bNEWT extends UITestCase { static void destroyWindow(final Window window) throws InterruptedException { if(null!=window) { window.destroy(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(window, false, null)); } } @@ -249,7 +249,7 @@ public class TestScreenMode02bNEWT extends UITestCase { Assert.assertEquals(false,window.isVisible()); Assert.assertEquals(false,window.isNativeValid()); - Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(screen, false, null)); Assert.assertEquals(false,screen.isNativeValid()); Assert.assertEquals(false,display.isNativeValid()); } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java index 3878e8ba5..bf2cc5289 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java @@ -114,8 +114,8 @@ public class TestParenting01aAWT extends UITestCase { final Animator animator1 = new Animator(glWindow1); animator1.setUpdateFPSFrames(1, null); animator1.start(); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow1, true)); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, true)); + Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow1, true, null)); + Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, true, null)); while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) { Thread.sleep(100); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java index 4af752eb4..1144ffbe6 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java @@ -178,8 +178,8 @@ public class TestParenting01cSwingAWT extends UITestCase { jFrame1.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glWindow1, true, null)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true, null)); // visible test Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent()); @@ -196,14 +196,14 @@ public class TestParenting01cSwingAWT extends UITestCase { System.err.println("Demos: 3 - !Visible"); jFrame1.setVisible(false); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, false)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, false, null)); SwingUtilities.invokeAndWait(new Runnable() { public void run() { System.err.println("Demos: 4 - Visible"); jFrame1.setVisible(true); } }); - Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true, null)); final boolean wasOnscreen = glWindow1.getChosenCapabilities().isOnscreen(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01dAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01dAWT.java index e23b36f07..f0cc0454c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01dAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01dAWT.java @@ -145,8 +145,8 @@ public class TestParenting01dAWT extends UITestCase { }); Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent()); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow1, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow1, true, null)); glWindow1.display(); Assert.assertEquals("Init Counter Invalid "+glelCounter, 1, glelCounter.initCount); Assert.assertEquals("Dispose Counter Invalid "+glelCounter, 0, glelCounter.disposeCount); @@ -172,14 +172,14 @@ public class TestParenting01dAWT extends UITestCase { // GL state shall be preserved! // glWindow1.setVisible(false); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, false)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow1, false, null)); System.err.println(getSimpleTestName(".")+": Start Reparent #2"); final Window.ReparentOperation rop2 = glWindow1.reparentWindow(newtCanvasAWT.getNativeWindow(), -1, -1, reparentingHints); System.err.println(getSimpleTestName(".")+": Result Reparent #2: "+rop2); Assert.assertEquals(Window.ReparentOperation.ACTION_NATIVE_CREATION, rop2); glWindow1.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow1, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(glWindow1, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(glWindow1, true, null)); glWindow1.display(); if( triggerPreserveGLState ) { Assert.assertEquals("Init Counter Invalid (Preserve Failed 2) "+glelCounter, 1, glelCounter.initCount); 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 65ba3239a..a7a5a9791 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java +++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java @@ -646,50 +646,42 @@ public class AWTRobotUtil extends TestUtil { /** * + * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @return True if the Component becomes <code>visible</code> within TIME_OUT */ - public static boolean waitForVisible(final Object obj, final boolean visible) throws InterruptedException { - int wait; + public static boolean waitForVisible(final Object obj, final boolean visible, final Runnable waitAction) throws InterruptedException { if(obj instanceof com.jogamp.newt.Window) { - final com.jogamp.newt.Window win = (com.jogamp.newt.Window) obj; - for (wait=0; wait<POLL_DIVIDER && visible != win.isVisible(); wait++) { - Thread.sleep(TIME_SLICE); - } + return NewtTestUtil.waitForVisible((com.jogamp.newt.Window) obj, visible, waitAction); } else if(NativeWindowFactory.isAWTAvailable() && obj instanceof java.awt.Component) { + int wait; final java.awt.Component comp = (java.awt.Component) obj; for (wait=0; wait<POLL_DIVIDER && visible != comp.isShowing(); wait++) { - Thread.sleep(TIME_SLICE); + if( null != waitAction ) { + waitAction.run(); + } else { + Thread.sleep(TIME_SLICE); + } } + return wait<POLL_DIVIDER; } else { throw new RuntimeException("Neither AWT nor NEWT: "+obj); } - return wait<POLL_DIVIDER; } /** * @param obj the component to wait for * @param realized true if waiting for component to become realized, otherwise false - * @return True if the Component becomes realized (not displayable, native invalid) within TIME_OUT - * @throws InterruptedException - */ - public static boolean waitForRealized(final Object obj, final boolean realized) throws InterruptedException { - return waitForRealized(obj, null, realized); - } - - /** - * @param obj the component to wait for * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate - * @param realized true if waiting for component to become realized, otherwise false * @return True if the Component becomes realized (not displayable, native invalid) within TIME_OUT * @throws InterruptedException */ - public static boolean waitForRealized(final Object obj, final Runnable waitAction, final boolean realized) throws InterruptedException { + public static boolean waitForRealized(final Object obj, final boolean realized, final Runnable waitAction) throws InterruptedException { if(obj instanceof com.jogamp.newt.Screen) { - return NewtTestUtil.waitForRealized((com.jogamp.newt.Screen) obj, waitAction, realized); + return NewtTestUtil.waitForRealized((com.jogamp.newt.Screen) obj, realized, waitAction); } else if(obj instanceof com.jogamp.newt.Window) { - return NewtTestUtil.waitForRealized((com.jogamp.newt.Window) obj, waitAction, realized); + return NewtTestUtil.waitForRealized((com.jogamp.newt.Window) obj, realized, waitAction); } else if(obj instanceof GLAutoDrawable) { - return GLTestUtil.waitForRealized((GLAutoDrawable) obj, waitAction, realized); + return GLTestUtil.waitForRealized((GLAutoDrawable) obj, realized, waitAction); } else if (NativeWindowFactory.isAWTAvailable() && obj instanceof java.awt.Component) { long t0 = System.currentTimeMillis(); long t1 = t0; diff --git a/src/test/com/jogamp/opengl/test/junit/util/GLTestUtil.java b/src/test/com/jogamp/opengl/test/junit/util/GLTestUtil.java index d7ab35055..f9085b98e 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/GLTestUtil.java +++ b/src/test/com/jogamp/opengl/test/junit/util/GLTestUtil.java @@ -73,12 +73,12 @@ public class GLTestUtil extends TestUtil { /** * @param glad the GLAutoDrawable to wait for - * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @param realized true if waiting for component to become realized, otherwise false + * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @return True if the Component becomes realized (not displayable, native invalid) within TIME_OUT * @throws InterruptedException */ - public static boolean waitForRealized(final GLAutoDrawable glad, final Runnable waitAction, final boolean realized) throws InterruptedException { + public static boolean waitForRealized(final GLAutoDrawable glad, final boolean realized, final Runnable waitAction) throws InterruptedException { final long t0 = System.currentTimeMillis(); long t1 = t0; while( (t1-t0) < TIME_OUT && realized != glad.isRealized() ) { diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java index 361a6c230..5dcfb2f98 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java +++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java @@ -67,8 +67,8 @@ public class NEWTGLContext { Assert.assertNotNull(window); window.setSize(width, height); window.setVisible(true); - Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true)); - Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true)); + Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); + Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); final GLDrawable drawable = factory.createGLDrawable(window); diff --git a/src/test/com/jogamp/opengl/test/junit/util/NewtTestUtil.java b/src/test/com/jogamp/opengl/test/junit/util/NewtTestUtil.java index 150b27262..003d861a7 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/NewtTestUtil.java +++ b/src/test/com/jogamp/opengl/test/junit/util/NewtTestUtil.java @@ -99,25 +99,29 @@ public class NewtTestUtil extends TestUtil { } /** - * + * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @return True if the Component becomes <code>visible</code> within TIME_OUT */ - public static boolean waitForVisible(final Window win, final boolean visible) throws InterruptedException { + public static boolean waitForVisible(final Window win, final boolean visible, final Runnable waitAction) throws InterruptedException { int wait; for (wait=0; wait<POLL_DIVIDER && visible != win.isVisible(); wait++) { - Thread.sleep(TIME_SLICE); + if( null != waitAction ) { + waitAction.run(); + } else { + Thread.sleep(TIME_SLICE); + } } return wait<POLL_DIVIDER; } /** * @param screen the Screen to wait for - * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @param realized true if waiting for component to become realized, otherwise false + * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @return True if the Component becomes realized (not displayable, native invalid) within TIME_OUT * @throws InterruptedException */ - public static boolean waitForRealized(final Screen screen, final Runnable waitAction, final boolean realized) throws InterruptedException { + public static boolean waitForRealized(final Screen screen, final boolean realized, final Runnable waitAction) throws InterruptedException { final long t0 = System.currentTimeMillis(); long t1 = t0; while( (t1-t0) < TIME_OUT && realized != screen.isNativeValid() ) { @@ -132,12 +136,12 @@ public class NewtTestUtil extends TestUtil { } /** * @param win the Window to wait for - * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @param realized true if waiting for component to become realized, otherwise false + * @param waitAction if not null, Runnable shall wait {@link #TIME_SLICE} ms, if appropriate * @return True if the Component becomes realized (not displayable, native invalid) within TIME_OUT * @throws InterruptedException */ - public static boolean waitForRealized(final Window win, final Runnable waitAction, final boolean realized) throws InterruptedException { + public static boolean waitForRealized(final Window win, final boolean realized, final Runnable waitAction) throws InterruptedException { final long t0 = System.currentTimeMillis(); long t1 = t0; while( (t1-t0) < TIME_OUT && realized != win.isNativeValid() ) { |