From 3704d1553c9eac8b3d9fb1e24b9a513cb362b092 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Sep 2012 00:27:37 +0200 Subject: Anotate focus tests in regards to OSX stability .. sporadically won't gain focus and receive keyboard input via AWTRobot --- .../com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java | 6 +++--- .../com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java index 592b00144..5d6218df4 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java @@ -163,11 +163,11 @@ public class TestFocus01SwingAWTRobot extends UITestCase { animator.start(); // Button Focus - Thread.sleep(100); // allow event sync + Thread.sleep(200); // allow event sync System.err.println("FOCUS AWT Button request"); EventCountAdapterUtil.reset(eventCountAdapters); - AWTRobotUtil.assertRequestFocusAndWait(robot, button, button, buttonFA, frame1FA); + AWTRobotUtil.assertRequestFocusAndWait(robot, button, button, buttonFA, frame1FA); // OSX sporadically button did not gain - major UI failure Assert.assertEquals(false, glWindow1FA.focusGained()); Assert.assertEquals(false, newtCanvasAWTFA.focusGained()); System.err.println("FOCUS AWT Button sync"); @@ -181,7 +181,7 @@ public class TestFocus01SwingAWTRobot extends UITestCase { Thread.sleep(100); // allow event sync System.err.println("FOCUS NEWT Canvas/GLWindow request"); EventCountAdapterUtil.reset(eventCountAdapters); - AWTRobotUtil.assertRequestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonFA); + AWTRobotUtil.assertRequestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonFA); // OSX sporadically button did not loose - minor UI failure Assert.assertTrue("Focus prev. gained, but NewtCanvasAWT didn't loose it. Gainer: "+glWindow1FA+"; Looser "+newtCanvasAWTFA, AWTRobotUtil.waitForFocus(glWindow1FA, newtCanvasAWTFA)); System.err.println("FOCUS NEWT Canvas/GLWindow sync"); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java index d8a9640c1..0e87144da 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java @@ -183,12 +183,12 @@ public class TestFocus02SwingAWTRobot extends UITestCase { Thread.sleep(100); // allow event sync System.err.println("FOCUS AWT Button Outer request"); EventCountAdapterUtil.reset(eventCountAdapters); - AWTRobotUtil.assertRequestFocusAndWait(robot, buttonNorthOuter, buttonNorthOuter, buttonNorthOuterFA, jFrame1FA); + AWTRobotUtil.assertRequestFocusAndWait(robot, buttonNorthOuter, buttonNorthOuter, buttonNorthOuterFA, jFrame1FA); // OSX sporadically buttonNorthOuter did not gain - major UI failure Assert.assertEquals(false, glWindow1FA.focusGained()); Assert.assertEquals(false, newtCanvasAWTFA.focusGained()); Assert.assertEquals(false, buttonNorthInnerFA.focusGained()); System.err.println("FOCUS AWT Button Outer sync"); - AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, buttonNorthOuter, buttonNorthOuterKA); + AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, buttonNorthOuter, buttonNorthOuterKA); // OSX sporadically won't receive the keyboard input - major UI failure AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, buttonNorthOuter, buttonNorthOuterMA); AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, -- cgit v1.2.3