aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-13 19:31:18 +0100
committerSven Gothel <[email protected]>2014-01-13 19:31:18 +0100
commit41be8824318d709459c08669218696d196719c90 (patch)
tree4c6c746328b7f0287b020488cc7d8f7d023bd177
parent367b704b448b4ebabcfc62cc29e61fa5760514d1 (diff)
TestParenting01dAWT: Add waitForVisible after toggling NEWT child window visibility helping robostness of test case.
-rw-r--r--make/scripts/tests.sh6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01dAWT.java5
2 files changed, 7 insertions, 4 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index b99f7866c..ed8b8b395 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -194,7 +194,7 @@ function jrun() {
#D_ARGS="-Dnewt.debug.EDT"
#D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT -Djogl.debug.GLContext"
#D_ARGS="-Dnewt.debug.Window -Djogl.debug.Animator -Dnewt.debug.Screen"
- D_ARGS="-Dnativewindow.debug.JAWT -Dnewt.debug.Window"
+ #D_ARGS="-Dnativewindow.debug.JAWT -Dnewt.debug.Window"
#D_ARGS="-Dnewt.debug.Window.KeyEvent"
#D_ARGS="-Dnewt.debug.Window.MouseEvent"
#D_ARGS="-Dnewt.debug.Window.MouseEvent -Dnewt.debug.Window.KeyEvent"
@@ -519,7 +519,7 @@ function testawtswt() {
#
# GLCanvas moving between JTabbedPanel's tabs
# OK (X11, OSX)
-testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816JTabbedPanelVisibilityB849B878AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816JTabbedPanelVisibilityB849B878AWT $*
#
# GLCanvas/AWT Checkbox Visibility
@@ -644,7 +644,7 @@ testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816JTabbedPanelVisibilityB8
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT $*
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01dAWT $*
+testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01dAWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02AWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting04AWT $*
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 00b32ac35..288918e48 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.waitForRealized(glWindow1, true));
Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(glWindow1, true));
glWindow1.display();
Assert.assertEquals("Init Counter Invalid "+glelCounter, 1, glelCounter.initCount);
Assert.assertEquals("Dispose Counter Invalid "+glelCounter, 0, glelCounter.disposeCount);
@@ -172,11 +172,14 @@ public class TestParenting01dAWT extends UITestCase {
// GL state shall be preserved!
//
glWindow1.setVisible(false);
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(glWindow1, false));
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));
glWindow1.display();
if( triggerPreserveGLState ) {
Assert.assertEquals("Init Counter Invalid (Preserve Failed 2) "+glelCounter, 1, glelCounter.initCount);