aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-23 06:30:25 +0100
committerSven Gothel <[email protected]>2010-12-23 06:30:25 +0100
commit643b37d3e5e329ecad3890792bc8a35e6e1ea49f (patch)
tree401f903b27d91bb2d06167c8acda606ea7723300 /src
parente8b25a1d6c9fe06b68bb16c0ea19276f97e28414 (diff)
TestCloseNewtAWT: Use new AWTRobotUtil.closeWindow()
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java20
1 files changed, 2 insertions, 18 deletions
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 509a0af15..69f9da052 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestCloseNewtAWT.java
@@ -29,10 +29,9 @@
package com.jogamp.opengl.test.junit.newt;
import org.junit.Test;
+import org.junit.Assert;
import java.lang.reflect.InvocationTargetException;
-import java.awt.EventQueue;
-import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
@@ -93,29 +92,14 @@ public class TestCloseNewtAWT extends UITestCase {
}
}
- class NEWTWindowClosingAdapter extends WindowAdapter {
- public void windowDestroyNotify(WindowEvent e) {
- System.err.println("Destroy NEWT: windowDestroyNotify "+Thread.currentThread() + ", "+ e);
- }
- }
-
- class AWTClosingWindowAdapter extends java.awt.event.WindowAdapter {
- public void windowClosing(WindowEvent ev) {
- System.err.println("Destroy AWT: windowClosing "+Thread.currentThread() + ", "+ ev);
- }
- }
-
-
@Test
public void testCloseNewtAWT() throws InterruptedException, InvocationTargetException {
newtWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault()));
- newtWindow.addWindowListener(new NEWTWindowClosingAdapter());
newtCanvas = new MyCanvas(newtWindow);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
frame = new JFrame("NEWT Close Test");
- frame.addWindowListener(new AWTClosingWindowAdapter());
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().add(newtCanvas);
frame.pack();
@@ -125,7 +109,7 @@ public class TestCloseNewtAWT extends UITestCase {
});
Thread.sleep(1000);
- AWTRobotUtil.closeWindow(frame);
+ Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, true));
GLProfile.shutdown();
}