|
From: <tre...@us...> - 2007-09-27 21:19:06
|
Revision: 453
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=453&view=rev
Author: trevorolio
Date: 2007-09-27 14:19:10 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
Fixed up the sim body so that it doesn't take much memory.
Added a handy script which uses the multiuser tests to run robots around in a space.
This is handy for testing avatars, but also looks cool.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java 2007-09-27 21:19:06 UTC (rev 452)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java 2007-09-27 21:19:10 UTC (rev 453)
@@ -44,7 +44,7 @@
URI serviceURI = null;
- public AppletTestWindow(URI serviceURI, long spaceID, String authCookie, Dimension appDimension, boolean decorated) {
+ public AppletTestWindow(URI serviceURI, long spaceID, String authCookie, Dimension appDimension, boolean fullScreen) {
ArgumentUtils.assertNotNull(appDimension);
this.appDimension = appDimension;
ArgumentUtils.assertNotNull(serviceURI);
@@ -54,7 +54,7 @@
setSize(appDimension);
setLocation(30, 50);
setResizable(false);
- if (!decorated) {
+ if (fullScreen) {
this.setUndecorated(true);
}
HashMap parameters1 = new HashMap();
@@ -122,7 +122,7 @@
applet.start();
}
- public void cleanup(){
+ public void cleanup() {
applet.destroy();
}
@@ -134,18 +134,25 @@
if (fullScreen) {
dim = new Dimension(device.getDisplayMode().getWidth(), device.getDisplayMode().getWidth());
}
- String serviceURI=null;
- String loginCookie=null;
- try {
- PropStorage ps=new PropStorage();
- ps.loadPropertySet(PropStorage.BASIC_PROPS);
- serviceURI = ps.getKeyFromSet(PropStorage.BASIC_PROPS, "ogoglio.baseUrl");
- ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS);
- WebAPIAuthenticator authenticator = new WebAPIAuthenticator(new WebAPIClientWire(), new WebAPIDescriptor(new URI(serviceURI)), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
- loginCookie = authenticator.getAuthCookie();
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
+ String serviceURI = null;
+
+ PropStorage ps = new PropStorage();
+ ps.loadPropertySet(PropStorage.BASIC_PROPS);
+ serviceURI = ps.getKeyFromSet(PropStorage.BASIC_PROPS, "ogoglio.baseUrl");
+ ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS);
+
+ String loginCookie = null;
+ if (args.length > 0 && args[0].equals("guest")) {
+ System.out.println("Guesting in");
+ loginCookie = "guest_Test_Client_" + System.currentTimeMillis();
+ } else {
+ try {
+ WebAPIAuthenticator authenticator = new WebAPIAuthenticator(new WebAPIClientWire(), new WebAPIDescriptor(new URI(serviceURI)), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
+ loginCookie = authenticator.getAuthCookie();
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
}
long spaceID = Long.parseLong(System.getProperty("AppletTestWindow.space"));
@@ -162,5 +169,4 @@
System.exit(1);
}
}
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|