aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-09-16 15:39:10 +0200
committerSven Gothel <[email protected]>2012-09-16 15:39:10 +0200
commitf2bd50ff25009de477a203460abe8a5597acdbc5 (patch)
tree9746290ec888ff84d9d3954a55203e0d13e91f09 /src
parent266d0ba5a4acde851dab3abd7dfe4b72542d0675 (diff)
Adding test case for Bug 611: On Windows XP is a performance issue, after JOGL initialization there seems to be a huge time lag when trying to open the Desktop folder.
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug611AWT.java81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug611AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug611AWT.java
new file mode 100644
index 000000000..b6a7639bd
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug611AWT.java
@@ -0,0 +1,81 @@
+
+package com.jogamp.opengl.test.junit.jogl.awt;
+
+import java.awt.Desktop;
+import java.io.File;
+
+import javax.media.opengl.GLProfile;
+
+import org.junit.Test;
+
+import com.jogamp.common.os.Platform;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+/**
+ * As reported in Bug 611, on Windows XP is a performance issue:
+ * After JOGL initialization there seems to be a huge time lag
+ * when trying to open the Desktop folder.
+ * <p>
+ * Test disabled since showing the Desktop folder will
+ * disturb the 'desktop' .. if there is another way to show
+ * the performance bug, pls do so.
+ * </p>
+ * <p>
+ * Since Windows XP is out of life .. we may not care ..
+ * </p>
+ */
+public class TestBug611AWT extends UITestCase {
+
+ @Test
+ public void test00() {
+ // make junit happy
+ }
+
+ // @Test
+ public void test01() {
+ try {
+ // System.setProperty("jogamp.gluegen.UseTempJarCache", "false");
+ GLProfile.initSingleton();
+ Desktop desktop;
+ if (Desktop.isDesktopSupported()) {
+ desktop = Desktop.getDesktop();
+ } else {
+ desktop = null;
+ }
+ if(null != desktop) {
+ String home = System.getProperty("user.home");
+ File homeFolder = null;
+ if(null != home) {
+ {
+ File tst = new File(home + "/Desktop");
+ if( tst.canRead() ) {
+ homeFolder = tst;
+ }
+ }
+ if(null == homeFolder) {
+ File tst = new File(home);
+ if( tst.canRead() ) {
+ homeFolder = tst;
+ }
+ }
+ }
+ if(null == homeFolder) {
+ if(Platform.getOSType() == Platform.OSType.WINDOWS) {
+ homeFolder = new File("c:\\");
+ } else {
+ homeFolder = new File("/");
+ }
+ }
+ if(null != homeFolder) {
+ desktop.open(homeFolder);
+ }
+ }
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestBug611AWT.class.getName());
+ }
+}