aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-11-18 13:03:58 +0100
committerSven Gothel <[email protected]>2013-11-18 13:03:58 +0100
commitb335cf086f8ee85985962b6f6676b99ab8141a77 (patch)
tree9686eca4ae6eab2cd0631061cab72425b6309f42 /src/test/com
parent5c6c11abf643013976ecbc0df463a923a1f52696 (diff)
NewtCanvasAWT: Use final AWT[Key|Mouse]Adapter and set downstream lazily; Consume AWT KeyEvents in downstream mode; Test respects 'consumed' key events.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus01SwingAWTRobot.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus02SwingAWTRobot.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus01SwingAWTRobot.java
index 29c3279aa..54842cd6e 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus01SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus01SwingAWTRobot.java
@@ -193,7 +193,7 @@ public class TestParentingFocus01SwingAWTRobot extends UITestCase {
}
System.err.println("FOCUS NEWT Canvas/GLWindow sync");
AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
- Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
+ Assert.assertEquals("AWT parent canvas received non consumed keyboard events", newtCanvasAWTKA.getConsumedCount(), newtCanvasAWTKA.getCount());
// Remove listeners to avoid logging during dispose/destroy.
glWindow1.removeKeyListener(glWindow1KA);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus02SwingAWTRobot.java
index aa02e096b..3aa952e30 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus02SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus02SwingAWTRobot.java
@@ -215,7 +215,7 @@ public class TestParentingFocus02SwingAWTRobot extends UITestCase {
Assert.assertEquals(false, buttonNorthInnerFA.focusGained());
System.err.println("FOCUS NEWT Canvas/GLWindow sync");
AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
- Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
+ Assert.assertEquals("AWT parent canvas received non consumed keyboard events", newtCanvasAWTKA.getConsumedCount(), newtCanvasAWTKA.getCount());
AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1,
glWindow1, glWindow1MA);
AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2,
@@ -253,7 +253,7 @@ public class TestParentingFocus02SwingAWTRobot extends UITestCase {
Assert.assertEquals(false, buttonNorthOuterFA.focusGained());
System.err.println("FOCUS NEWT Canvas/GLWindow sync");
AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
- Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
+ Assert.assertEquals("AWT parent canvas received non consumed keyboard events", newtCanvasAWTKA.getConsumedCount(), newtCanvasAWTKA.getCount());
AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1,
glWindow1, glWindow1MA);
AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2,