You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/09/21 13:48:06 UTC

svn commit: r1388443 - in /incubator/ooo/trunk/test: testcommon/source/org/openoffice/test/ testcommon/source/org/openoffice/test/common/ testcommon/source/org/openoffice/test/vcl/widgets/ testgui/data/pvt_benchmark/ testgui/source/fvt/gui/sc/validity/...

Author: liuzhe
Date: Fri Sep 21 11:48:05 2012
New Revision: 1388443

URL: http://svn.apache.org/viewvc?rev=1388443&view=rev
Log:
Add new pvt.uno.Benchmark

Added:
    incubator/ooo/trunk/test/testgui/source/pvt/gui/Benchmark.java
Modified:
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/GraphicsUtil.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclButton.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclComboBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclControl.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDialog.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDockingWin.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclEditBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclField.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclListBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenu.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenuItem.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMessageBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclStatusBar.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabControl.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabPage.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclToolBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWidget.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWindow.java
    incubator/ooo/trunk/test/testgui/data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDateSupport1024Columns.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDialogSetting.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java
    incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java
    incubator/ooo/trunk/test/testuno/source/testcase/mix/MixedTest.java

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java Fri Sep 21 11:48:05 2012
@@ -22,6 +22,7 @@
 package org.openoffice.test;
 
 import java.io.File;
+import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.text.SimpleDateFormat;
@@ -55,7 +56,9 @@ public class OpenOffice {
 	private static final String USERHOME = System.getProperty("user.home");
 	private static final String BIN = SystemUtil.isWindows() ? "program/soffice.exe" : SystemUtil.isMac() ? "MacOS/soffice": "program/soffice"; 
 	private static final String SYSUSERCONFIG = SystemUtil.isWindows()? System.getenv("APPDATA") : SystemUtil.isMac() ?  USERHOME + "/Library/Application Support" : USERHOME;
-
+	public static final String DEFAULT_UNO_URL = "socket,host=127.0.0.1,port=2002;urp";
+	public static final int DEFAULT_AUTOMATION_PORT = 12479;
+	
 	private static OpenOffice defaultInstance = null;
 
 	private File userInstallation = null;
@@ -66,15 +69,17 @@ public class OpenOffice {
 
 	private File bin = null;
 	
+	private String binPath = null;
+	
 	private ArrayList<String> args = new ArrayList<String>();
 
 	private ArrayList<String> registryModifications = new ArrayList<String>();
 	
-	private int automationPort = 12479;
+	private int automationPort = 0;
 
 	private Process process = null;
 	
-	private String unoUrl = "socket,host=127.0.0.1,port=2002;urp";
+	private String unoUrl = null;
 	
 	private Properties versionProps = null;
 	
@@ -115,6 +120,10 @@ public class OpenOffice {
 
 		home = new File(appHome);
 		bin = new File(appHome, BIN);
+		try {
+			binPath = bin.getCanonicalPath();
+		} catch (IOException e1) {
+		}
 		File binParent = bin.getParentFile();
 		File bootstrapFile = new File(binParent, "bootstraprc");
 		if (!bootstrapFile.exists())
@@ -144,6 +153,8 @@ public class OpenOffice {
 	public static OpenOffice getDefault() {
 		if (defaultInstance == null) {
 			defaultInstance = new OpenOffice();
+			defaultInstance.setAutomationPort(DEFAULT_AUTOMATION_PORT);
+			defaultInstance.setUnoUrl(DEFAULT_UNO_URL);
 			defaultInstance.addArgs("-nofirststartwizard", "-norestore", "-quickstart=no");
 			defaultInstance.addRegistryModifications("<item oor:path=\"/org.openoffice.Office.Common/Misc\"><prop oor:name=\"UseSystemFileDialog\" oor:op=\"fuse\"><value>false</value></prop></item>",
 					"<item oor:path=\"/org.openoffice.Office.Common/Security/Scripting\"><prop oor:name=\"MacroSecurityLevel\" oor:op=\"fuse\"><value>0</value></prop></item>");
@@ -152,7 +163,12 @@ public class OpenOffice {
 		return defaultInstance;
 	}
 
-
+	public static void restoreDefault() {
+		if (defaultInstance != null) {
+			
+		}
+	}
+	
 	public Properties getVersionProps() {
 		return versionProps;
 	}
@@ -283,7 +299,7 @@ public class OpenOffice {
 			return false;
 		
 		ArrayList<String> cmds = new ArrayList<String>();
-		cmds.add(bin.getAbsolutePath());
+		cmds.add(binPath);
 		if (automationPort > 0) {
 			cmds.add("-automationport=" + automationPort);
 			cmds.add("-enableautomation");
@@ -305,19 +321,21 @@ public class OpenOffice {
 		if (args != null)
 			cmds.addAll(args);
 
-		File registry = new File(getUserInstallation(), "user/registrymodifications.xcu");
-		String content = FileUtil.readFileAsString(registry);
-		String newContent = "";
-		for (String item : registryModifications) {
-			if (!content.contains(item)) {
-				newContent += item;
+		if (registryModifications.size() > 0) {
+			File registry = new File(getUserInstallation(), "user/registrymodifications.xcu");
+			String content = FileUtil.readFileAsString(registry);
+			String newContent = "";
+			for (String item : registryModifications) {
+				if (!content.contains(item)) {
+					newContent += item;
+				}
 			}
+			content.replace("</oor:items>", "");
+			if (content.length() == 0)
+				content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?><oor:items xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
+			content += newContent + "</oor:items>";
+			FileUtil.writeStringToFile(registry.getAbsolutePath(), content);
 		}
-		content.replace("</oor:items>", "");
-		if (content.length() == 0)
-			content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?><oor:items xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
-		content += newContent + "</oor:items>";
-		FileUtil.writeStringToFile(registry.getAbsolutePath(), content);
 		
 		process = SystemUtil.backgroundExec(cmds.toArray(new String[]{}), null, null, null, null);
 		
@@ -330,4 +348,6 @@ public class OpenOffice {
 			throw new RuntimeException("OpenOffice can't be started!");
 		return true;
 	}
+	
+	
 }

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/GraphicsUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/GraphicsUtil.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/GraphicsUtil.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/GraphicsUtil.java Fri Sep 21 11:48:05 2012
@@ -52,6 +52,7 @@ public class GraphicsUtil {
 	 */
 	static final double ERR_RANGLE_ELLIPSE = 1;
 	
+	static Robot robot = null;
 	
 	/**
 	 * Load a image file as buffered image
@@ -138,8 +139,11 @@ public class GraphicsUtil {
 	 */
 	public static BufferedImage screenshot(String filename, Rectangle area) {
 		// screen capture
+
 		try {
-			Robot robot = new Robot();
+			if (robot == null)
+				robot = new Robot();
+			
 			if (area == null)
 				area = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
 

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/SystemUtil.java Fri Sep 21 11:48:05 2012
@@ -393,9 +393,9 @@ public class SystemUtil {
 				File file = new File(SCRIPT_TEMP_DIR, "pps.vbs");
 				String contents = "Set wmi=GetObject(\"Winmgmts:\")\n\r"
 						+ "Set pps = wmi.ExecQuery(\"Select * from Win32_PerfFormattedData_PerfProc_Process Where IDProcess='" + processId+"'\")\n\r"
-						+ "WScript.Echo \"pcpu rss\" \n\r"
+						+ "WScript.Echo \"pcpu PrivateBytes WorkingSet HandleCount\" \n\r"
 						+ "For Each pp in pps \n\r"
-						+ "WScript.Echo pp.PercentProcessorTime & \" \" & Round(pp.WorkingSet/1024) \n\r"
+						+ "WScript.Echo pp.PercentProcessorTime & \" \" & Round(pp.PrivateBytes/1024) & \" \" & Round(pp.WorkingSet/1024) & \" \" & pp.HandleCount \n\r"
 						+ "Next";
 //				String contents = "var wmi = GetObject(\"Winmgmts:\");\n"
 //						+ "var pps = new Enumerator(wmi.ExecQuery(\"Select * from Win32_PerfFormattedData_PerfProc_Process Where IDProcess='" + processId+"'\"));\n"
@@ -407,7 +407,7 @@ public class SystemUtil {
 				FileUtil.writeStringToFile(file.getAbsolutePath(), contents);
 				exec(new String[] { "cscript", "//Nologo", file.getAbsolutePath()}, null, null, output, output);
 			} else {
-				exec(new String[] {"ps", "-p", processId ,"-o", "pcpu,rss"}, null, null, output, output);
+				exec(new String[] {"ps", "-p", processId ,"-o", "pcpu,vsz,rss,tty"}, null, null, output, output);
 			}
 			BufferedReader reader = new BufferedReader(new StringReader(output.toString()));
 			String line = null;
@@ -429,10 +429,29 @@ public class SystemUtil {
 					case 1:
 						if (!" ".equals(token)) {
 							// 
+							p.put("vsz", Long.parseLong(token));
+							col++;
+						}
+						break;
+					case 2:
+						if (!" ".equals(token)) {
+							// 
 							p.put("rss", Long.parseLong(token));
 							col++;
 						}
 						break;
+					case 3:
+						if (!" ".equals(token)) {
+							//
+							try {
+								p.put("handles", Long.parseLong(token));
+							} catch (Exception e) {
+								p.put("handles", 0l);
+							}
+							
+							col++;
+						}
+						break;
 					}
 				}
 				return p;

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java Fri Sep 21 11:48:05 2012
@@ -48,10 +48,6 @@ public class VclApp {
 	
 	protected OpenOffice openOffice = null;
 	
-	public VclApp() {
-		this(OpenOffice.getDefault());
-	}
-	
 	public VclApp(OpenOffice openOffice) {
 //		this("localhost", openOffice.getAutomationPort());
 		this("127.0.0.1", openOffice.getAutomationPort());	// In case "localhost" is modified incorrectly
@@ -63,14 +59,6 @@ public class VclApp {
 		caller = new CommandCaller(communicationManager);
 		new Handshaker(communicationManager);
 	}
-	
-	public static VclApp getDefault() {
-		if (defaultInstance == null) {
-			defaultInstance = new VclApp();
-		}
-			
-		return defaultInstance;
-	}
 
 	public void setWinInfoReceiver(WinInfoReceiver receiver) {
 		caller.setWinInfoReceiver(receiver);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclButton.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclButton.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclButton.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclButton.java Fri Sep 21 11:48:05 2012
@@ -33,10 +33,6 @@ import org.openoffice.test.vcl.client.Co
  */
 public class VclButton extends VclControl {
 	
-	public VclButton(String id) {
-		super(id);
-	}
-
 	public VclButton(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclComboBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclComboBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclComboBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclComboBox.java Fri Sep 21 11:48:05 2012
@@ -31,10 +31,6 @@ import org.openoffice.test.vcl.client.Co
  */
 public class VclComboBox extends VclControl {
 
-	public VclComboBox(String id) {
-		super(id);
-	}
-
 	public VclComboBox(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclControl.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclControl.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclControl.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclControl.java Fri Sep 21 11:48:05 2012
@@ -37,15 +37,6 @@ public class VclControl extends VclWidge
 	protected String id = null;
 	
 	protected int type = -1;
-	
-	/**
-	 * Construct an instance with id in the default VclApp
-	 * @param id
-	 */
-	public VclControl(String id) {
-		super();
-		this.id = id;
-	}
 
 	/**
 	 * Construct an instance with the given VclApp and ID

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDialog.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDialog.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDialog.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDialog.java Fri Sep 21 11:48:05 2012
@@ -31,13 +31,6 @@ import org.openoffice.test.vcl.client.Co
  * Proxy to access the VCL dialog
  */
 public class VclDialog extends VclWindow {
-	
-
-	public VclDialog(String id) {
-		super(id);
-	}
-
-
 
 	public VclDialog(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDockingWin.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDockingWin.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDockingWin.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclDockingWin.java Fri Sep 21 11:48:05 2012
@@ -32,15 +32,6 @@ import org.openoffice.test.vcl.client.Co
  *
  */
 public class VclDockingWin extends VclWindow {
-	/**
-	 * Define VCL Docking window
-	 * @param uid the string id
-	 */
-	public VclDockingWin(String uid) {
-		super(uid);
-	}
-
-
 
 	public VclDockingWin(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclEditBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclEditBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclEditBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclEditBox.java Fri Sep 21 11:48:05 2012
@@ -30,12 +30,6 @@ import org.openoffice.test.vcl.client.Co
  *
  */
 public class VclEditBox extends VclControl {
-
-	
-	public VclEditBox(String id) {
-		super(id);
-	}
-
 	
 	public VclEditBox(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclField.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclField.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclField.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclField.java Fri Sep 21 11:48:05 2012
@@ -30,12 +30,6 @@ import org.openoffice.test.vcl.client.Co
  *
  */
 public class VclField extends VclEditBox{
-
-
-	public VclField(String id) {
-		super(id);
-	}
-
 	
 	public VclField(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclListBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclListBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclListBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclListBox.java Fri Sep 21 11:48:05 2012
@@ -28,12 +28,6 @@ import org.openoffice.test.vcl.client.Co
 
 public class VclListBox extends VclControl  {
 
-	
-	public VclListBox(String id) {
-		super(id);
-	}
-
-	
 	public VclListBox(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenu.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenu.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenu.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenu.java Fri Sep 21 11:48:05 2012
@@ -32,29 +32,19 @@ import org.openoffice.test.vcl.client.Co
 public class VclMenu extends VclWidget {
 
 	private VclControl window = null;
-
-	/**
-	 * Construct the popup menu
-	 * 
-	 */
-	public VclMenu() {
-		super();
-	}
-
 	
 	public VclMenu(VclApp app) {
 		super(app);
 	}
 
-
 	/**
 	 * Construct the menu on the given window
 	 * 
 	 * @param window
 	 */
 	public VclMenu(VclControl window) {
+		super(window.app);
 		this.window = window;
-		this.app = window.app;
 	}
 
 	/**

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenuItem.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenuItem.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenuItem.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMenuItem.java Fri Sep 21 11:48:05 2012
@@ -43,8 +43,8 @@ public class VclMenuItem extends VclWidg
 	 * 
 	 * @param id
 	 */
-	public VclMenuItem(int id) {
-		super();
+	public VclMenuItem(VclApp app, int id) {
+		super(app);
 		this.id = id;
 	}
 
@@ -54,8 +54,8 @@ public class VclMenuItem extends VclWidg
 	 * 
 	 * @param path
 	 */
-	public VclMenuItem(String path) {
-		super();
+	public VclMenuItem(VclApp app, String path) {
+		super(app);
 		this.path = path.split("->");
 	}
 
@@ -66,7 +66,7 @@ public class VclMenuItem extends VclWidg
 	 * @param id
 	 */
 	public VclMenuItem(VclMenu menu, int id) {
-		super();
+		super(menu.app);
 		this.id = id;
 		this.menu = menu;
 		this.app = menu.app;
@@ -79,7 +79,7 @@ public class VclMenuItem extends VclWidg
 	 * @param path
 	 */
 	public VclMenuItem(VclMenu menu, String path) {
-		super();
+		super(menu.app);
 		this.path = path.split("->");
 		this.menu = menu;
 		this.app = menu.app;
@@ -97,7 +97,7 @@ public class VclMenuItem extends VclWidg
 	 * @return
 	 */
 	public int getId() {
-		VclMenu menu = new VclMenu();
+		VclMenu menu = new VclMenu(app);
 		if (path != null) {
 			int count = menu.getItemCount();
 			for (int i = 0; i < count; i++) {
@@ -126,7 +126,7 @@ public class VclMenuItem extends VclWidg
 		if (menu != null)
 			menu.use();
 		for (int i = 0; i < path.length; i++) {
-			new VclMenuItem(path[i]).pick();
+			new VclMenuItem(app, path[i]).pick();
 			Tester.sleep(0.5);
 		}
 	}
@@ -143,7 +143,7 @@ public class VclMenuItem extends VclWidg
 		if (menu != null)
 			menu.use();
 		for (int i = 0; i < path.length - 1; i++)
-			new VclMenuItem(path[i]).pick();
+			new VclMenuItem(app, path[i]).pick();
 	}
 
 	/**

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMessageBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMessageBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMessageBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclMessageBox.java Fri Sep 21 11:48:05 2012
@@ -33,18 +33,9 @@ import org.openoffice.test.vcl.client.Vc
 public class VclMessageBox extends VclControl {
 
 	private String message = null;
-	
-	public VclMessageBox() {
-		super(Constant.UID_ACTIVE);
-	}
-	
-	public VclMessageBox(String id) {
-		super(id);
-	}
 
-	public VclMessageBox(String id, String msg) {
-		super(id);
-		this.message = msg;
+	public VclMessageBox(VclApp app) {
+		super(app, Constant.UID_ACTIVE);
 	}
 	
 	public VclMessageBox(VclApp app, String id) {

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclStatusBar.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclStatusBar.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclStatusBar.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclStatusBar.java Fri Sep 21 11:48:05 2012
@@ -31,10 +31,6 @@ import org.openoffice.test.vcl.client.Co
  */
 public class VclStatusBar extends VclControl {
 
-	public VclStatusBar(String id) {
-		super(id);
-	}
-
 	public VclStatusBar(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabControl.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabControl.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabControl.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabControl.java Fri Sep 21 11:48:05 2012
@@ -31,12 +31,8 @@ import org.openoffice.test.vcl.client.Co
  */
 public class VclTabControl extends VclControl {
 	
-	public VclTabControl() {
-		super(Constant.UID_ACTIVE);
-	}
-	
-	public VclTabControl(String id) {
-		super(id);
+	public VclTabControl(VclApp app) {
+		super(app, Constant.UID_ACTIVE);
 	}
 
 	public VclTabControl(VclApp app, String id) {

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabPage.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabPage.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabPage.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTabPage.java Fri Sep 21 11:48:05 2012
@@ -27,12 +27,7 @@ import org.openoffice.test.vcl.client.Co
 
 
 public class VclTabPage extends VclDialog {
-	
-	public VclTabPage(String id) {
-		super(id);
-	}
 
-	
 	public VclTabPage(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclToolBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclToolBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclToolBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclToolBox.java Fri Sep 21 11:48:05 2012
@@ -33,12 +33,6 @@ import org.openoffice.test.vcl.client.Co
  *
  */
 public class VclToolBox extends VclDockingWin {
-
-	
-	public VclToolBox(String uid) {
-		super(uid);
-	}
-
 	
 	public VclToolBox(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java Fri Sep 21 11:48:05 2012
@@ -26,15 +26,6 @@ import org.openoffice.test.vcl.client.Co
 
 
 public class VclTreeListBox extends VclControl {
-
-	/**
-	 * Construct the tree with its String ID
-	 * @param id
-	 */
-	public VclTreeListBox(String id) {
-		super(id);
-	}
-	
 	
 	public VclTreeListBox(VclApp app, String id) {
 		super(app, id);

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWidget.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWidget.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWidget.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWidget.java Fri Sep 21 11:48:05 2012
@@ -25,11 +25,6 @@ public class VclWidget {
 
 	protected VclApp app = null;
 
-	public VclWidget() {
-		super();
-		this.app = VclApp.getDefault();
-	}
-	
 	public VclWidget(VclApp app) {
 		super();
 		this.app = app;

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWindow.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWindow.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWindow.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclWindow.java Fri Sep 21 11:48:05 2012
@@ -26,7 +26,6 @@ package org.openoffice.test.vcl.widgets;
 import java.awt.Point;
 
 import org.openoffice.test.vcl.client.Constant;
-import org.openoffice.test.vcl.client.SmartId;
 
 /**
  * Proxy to access a VCL window.
@@ -34,12 +33,6 @@ import org.openoffice.test.vcl.client.Sm
  */
 public class VclWindow extends VclControl {
 	
-	
-	public VclWindow(String uid) {
-		super(uid);
-	}
-
-
 	public VclWindow(VclApp app, String id) {
 		super(app, id);
 	}

Modified: incubator/ooo/trunk/test/testgui/data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDateSupport1024Columns.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDateSupport1024Columns.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDateSupport1024Columns.java (original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDateSupport1024Columns.java Fri Sep 21 11:48:05 2012
@@ -25,21 +25,15 @@ import static org.junit.Assert.*;
 import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
-import java.io.File;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
-import org.openoffice.test.vcl.IDList;
-import org.openoffice.test.vcl.widgets.VclMessageBox;
 
 import testlib.gui.SCTool;
 
 public class ValidityDateSupport1024Columns {
-	private static IDList idList = new IDList(new File("./ids"));
-	public static final VclMessageBox ActiveMsgBox = new VclMessageBox(idList.getId("UID_ACTIVE"), "Message on message box.");
 
 	@Rule
 	public Logger log = Logger.getLogger(this);
@@ -87,15 +81,15 @@ public class ValidityDateSupport1024Colu
 		SCTool.selectRange("ALM1003");
 		scInputBarInput.activate();
 		typeKeys("01/01/08<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("ALM1003"));
 
 		SCTool.selectRange("AML1003");
 		scInputBarInput.activate();
 		typeKeys("12/31/07<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("AML1003"));
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDialogSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDialogSetting.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDialogSetting.java (original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sc/validity/ValidityDialogSetting.java Fri Sep 21 11:48:05 2012
@@ -25,22 +25,16 @@ import static org.junit.Assert.*;
 import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
-import java.io.File;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
-import org.openoffice.test.vcl.IDList;
-import org.openoffice.test.vcl.widgets.VclMessageBox;
 
 import testlib.gui.SCTool;
 
 public class ValidityDialogSetting {
-	private static IDList idList = new IDList(new File("./ids"));
-	public static final VclMessageBox ActiveMsgBox = new VclMessageBox(idList.getId("UID_ACTIVE"), "Message on message box.");
 
 	@Rule
 	public Logger log = Logger.getLogger(this);
@@ -93,48 +87,48 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("01/01/08");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A3"));
 
 		SCTool.selectRange("A4");
 		scInputBarInput.activate();
 		typeKeys("03/01/08");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A4"));
 
 		SCTool.selectRange("A5");
 		scInputBarInput.activate();
 		typeKeys("01/02/08");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A5"));
 
 		SCTool.selectRange("B1");
 		scInputBarInput.activate();
 		typeKeys("02/29/08");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B1"));
 
 		SCTool.selectRange("B2");
 		scInputBarInput.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B2"));
 
 		SCTool.selectRange("B3");
 		scInputBarInput.activate();
 		typeKeys("39448");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B3"));
 	}
 
@@ -164,32 +158,32 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("=1/3");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A2"));
 
 		SCTool.selectRange("A3");
 		scInputBarInput.activate();
 		typeKeys("0.3");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A3"));
 
 		SCTool.selectRange("A4");
 		scInputBarInput.activate();
 		typeKeys("0.333333333");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A4"));
 
 		SCTool.selectRange("B2");
 		scInputBarInput.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B2"));
 	}
 
@@ -225,16 +219,16 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys(" ");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A4"));
 
 		SCTool.selectRange("A3");
 		scInputBarInput.activate();
 		typeKeys("Testatest");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A3"));
 	}
 
@@ -266,13 +260,13 @@ public class ValidityDialogSetting {
 		SCTool.selectRange("A1");
 		scInputBarInput.activate();
 		typeKeys("testtesttesttest<enter>");
-		ActiveMsgBox.ok();
+		activeMsgBox.ok();
 		assertEquals("testtesttesttest", SCTool.getCellText("A1"));
 
 		SCTool.selectRange("A2");
 		scInputBarInput.activate();
 		typeKeys("sfsafsddddddd<enter>");
-		ActiveMsgBox.cancel();
+		activeMsgBox.cancel();
 		assertEquals("", SCTool.getCellText("A2"));
 
 		SCTool.selectRange("A2");
@@ -320,8 +314,8 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B2"));
 	}
 
@@ -370,40 +364,40 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("03:00:01");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B1"));
 
 		SCTool.selectRange("B2");
 		scInputBarInput.activate();
 		typeKeys("20:59:59");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B2"));
 
 		SCTool.selectRange("B3");
 		scInputBarInput.activate();
 		typeKeys("1.126");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B3"));
 
 		SCTool.selectRange("B4");
 		scInputBarInput.activate();
 		typeKeys("0.874");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B4"));
 
 		SCTool.selectRange("C1");
 		scInputBarInput.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("C1"));
 
 		SCTool.selectRange("C2");
@@ -416,8 +410,8 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("12:00");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("C3"));
 	}
 
@@ -444,16 +438,16 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("7:30");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("07:30:00 AM", SCTool.getCellText("A1"));
 
 		SCTool.selectRange("A2");
 		scInputBarInput.activate();
 		typeKeys("6:00");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.cancel();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.cancel();
 		assertEquals("", SCTool.getCellText("A2"));
 
 		SCTool.selectRange("A3");
@@ -495,24 +489,24 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("101");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B1"));
 
 		SCTool.selectRange("B2");
 		scInputBarInput.activate();
 		typeKeys("45.5");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("B2"));
 
 		SCTool.selectRange("C1");
 		scInputBarInput.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("Invalid value", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("C1"));
 	}
 
@@ -536,10 +530,10 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("13");
 		typeKeys("<enter>");
-		assertEquals("OpenOffice.org Calc", ActiveMsgBox.getCaption());
+		assertEquals("OpenOffice.org Calc", activeMsgBox.getCaption());
 		// assertEquals("Invalid value.",ActiveMsgBox.getMessage()); // Can not
 		// verify in multi-language
-		ActiveMsgBox.ok();
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A1"));
 	}
 
@@ -596,8 +590,8 @@ public class ValidityDialogSetting {
 		scInputBarInput.activate();
 		typeKeys("test32");
 		typeKeys("<enter>");
-		assertEquals("Invalid value.", ActiveMsgBox.getMessage());
-		ActiveMsgBox.ok();
+		assertEquals("Invalid value.", activeMsgBox.getMessage());
+		activeMsgBox.ok();
 		assertEquals("", SCTool.getCellText("A1"));
 
 		SCTool.selectRange("B1");

Added: incubator/ooo/trunk/test/testgui/source/pvt/gui/Benchmark.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/pvt/gui/Benchmark.java?rev=1388443&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/pvt/gui/Benchmark.java (added)
+++ incubator/ooo/trunk/test/testgui/source/pvt/gui/Benchmark.java Fri Sep 21 11:48:05 2012
@@ -0,0 +1,293 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+/**
+ * 
+ */
+
+package pvt.gui;
+
+import static org.openoffice.test.common.Testspace.*;
+import static org.openoffice.test.vcl.Tester.*;
+import static testlib.gui.UIMap.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+import org.openoffice.test.OpenOffice;
+import org.openoffice.test.common.Condition;
+import org.openoffice.test.common.Logger;
+import org.openoffice.test.common.SystemUtil;
+import org.openoffice.test.common.Testspace;
+
+
+public class Benchmark {
+	@Rule
+	public Logger log = Logger.getLogger(this);
+	
+	@Rule
+	public TestName testname = new TestName();
+	
+	private static PrintStream result;
+	
+	private static final double INTERVAL = 0.01;
+	
+	public Benchmark() {
+
+	}
+	
+	@BeforeClass
+	public static void beforeClass() throws Exception {
+		File resultFile = Testspace.getFile("output/gui_benchmark.csv");
+		resultFile.getParentFile().mkdirs();
+		result = new PrintStream(new FileOutputStream(resultFile));
+		OpenOffice.killAll();
+		
+		result.println("Scenario,Consumed Time,Memory(VSZ),Memory(RSS),Handles(Windows Only)");
+	}
+	
+	@AfterClass
+	public static void afterClass() throws Exception {
+		result.close();
+		app.close();
+	}
+	
+	private HashMap<String, Object> getPerfData() {
+		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice\\.exe .*-env).*");
+		String pid = (String) proccessInfo.get("pid");
+		return SystemUtil.getProcessPerfData(pid);
+	}
+	
+	private void addRecord(int i, long start, long end) {
+		HashMap<String, Object>  perf = getPerfData();
+		result.println(testname.getMethodName() + i + "," + (end - start) + "," + perf.get("vsz") + "," + perf.get("rss") + "," + perf.get("handles"));
+	}
+	
+	@Test
+	public void coolStartup() throws Exception {
+		aoo.kill();
+		aoo.cleanUserInstallation();
+		aoo.start();
+		long start = System.currentTimeMillis();
+		startcenter.waitForExistence(120, INTERVAL);
+		long end = System.currentTimeMillis();
+		sleep(2);
+		addRecord(0, start, end);
+		app.close();
+	}
+	
+	@Test
+	public void warmStartup() throws Exception {
+		for (int i = 0; i < 8; i++) {
+			aoo.kill();//make sure app is closed
+			aoo.start();
+			long start = System.currentTimeMillis();
+			startcenter.waitForExistence(120, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.close();
+		}
+	}
+
+	@Test
+	public void newTextDocument() {
+		for (int i = 0; i < 8; i++) {
+			aoo.kill();//make sure app is closed
+			aoo.start();
+			startCenterWriterButton.waitForExistence(120, 1);
+			sleep(2);
+			startCenterWriterButton.click(0.5, 0.5);
+			long start = System.currentTimeMillis();
+			writer.waitForExistence(60, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.close();
+		}
+	}
+
+	@Test
+	public void newSpreadsheet() {
+		for (int i = 0; i < 8; i++) {
+			aoo.kill();//make sure app is closed
+			aoo.start();
+			startCenterCalcButton.waitForExistence(120, 1);
+			sleep(2);
+			startCenterCalcButton.click(0.5, 0.5);
+			long start = System.currentTimeMillis();
+			calc.waitForExistence(60, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.close();
+		}
+	}
+	
+	@Test
+	public void newPresentation() {
+		for (int i = 0; i < 8; i++) {
+			aoo.kill();//make sure app is closed
+			aoo.start();
+			startCenterImpressButton.waitForExistence(120, 1);
+			sleep(2);
+			startCenterImpressButton.click(0.5, 0.5);
+			sleep(1);
+			presentationWizard.click(0.9, 0.95);
+			long start = System.currentTimeMillis();
+			impress.waitForExistence(60, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.close();
+		}
+	}
+	
+	@Test
+	public void loadFinishPlainDoc() {
+		loadFinishTextDocument("pvt_benchmark/sw_plain_120p.doc", "Page 1 / ");
+	}
+	
+	@Test
+	public void loadFinishPlainOdt() {
+		loadFinishTextDocument("pvt_benchmark/sw_plain_120p_odf1.2.odt", "Page 1 / ");
+	}
+	
+	@Test
+	public void loadFinishComplexDoc() {
+		loadFinishTextDocument("pvt_benchmark/sw_complex_100p.doc", "Page 1 / ");
+	}
+	
+	@Test
+	public void loadFinishComplexOdt() {
+		loadFinishTextDocument("pvt_benchmark/sw_complex_100p_odf1.2.odt", "Page 1 / ");
+	}
+	
+	public void loadFinishTextDocument(String file, final String indicator) {
+		String path = prepareData(file);
+		aoo.kill();
+		aoo.start();
+		startcenter.waitForExistence(120, 1);
+		for (int i = 0; i < 8; i++) {
+			app.dispatch(".uno:Open");
+			filePickerPath.setText(path);
+			filePickerOpen.click();
+			long start = System.currentTimeMillis();
+			new Condition() {
+	
+				@Override
+				public boolean value() {
+					String text = statusBar.getItemText(0);
+					if (text == null)
+						return false;
+					return text.startsWith(indicator);
+				}
+				
+			}.waitForTrue("", 120, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.dispatch(".uno:CloseDoc");
+		}
+	
+		app.close();
+	}
+	
+	@Test
+	public void loadFinishPlainXLS() {
+		loadFinishTextDocument("pvt_benchmark/sc_plain_4sh_5kcell.xls", "Sheet 2 / 4");
+	}
+	
+	@Test
+	public void loadFinishPlainODS() {
+		loadFinishTextDocument("pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods", "Sheet 1 / 4");
+	}
+	
+	@Test
+	public void loadFinishComplexXLS() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell.xls", "Sheet 2 / 13");
+	}
+	
+	@Test
+	public void loadFinishComplexODS() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods", "Sheet 6 / 13");
+	}
+	
+	
+	@Test
+	public void loadFinishPlainODP() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods", "Sheet 6 / 13");
+	}
+	
+	@Test
+	public void loadFinishPlainPPT() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods", "Sheet 6 / 13");
+	}
+	
+	@Test
+	public void loadFinishComplexODP() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods", "Sheet 6 / 13");
+	}
+	
+	@Test
+	public void loadFinishComplexPPT() {
+		loadFinishTextDocument("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods", "Sheet 6 / 13");
+	}
+	
+	public void loadFinish(String file, final String indicator) {
+		String path = prepareData(file);
+		aoo.kill();
+		aoo.start();
+		startcenter.waitForExistence(120, 1);
+		for (int i = 0; i < 8; i++) {
+			app.dispatch(".uno:Open");
+			filePickerPath.setText(path);
+			filePickerOpen.click();
+			long start = System.currentTimeMillis();
+			new Condition() {
+	
+				@Override
+				public boolean value() {
+					String text = statusBar.getItemText(0);
+					if (text == null)
+						return false;
+					return text.startsWith(indicator);
+				}
+				
+			}.waitForTrue("", 120, INTERVAL);
+			long end = System.currentTimeMillis();
+			sleep(2);
+			addRecord(i, start, end);
+			app.dispatch(".uno:CloseDoc");
+		}
+	
+		app.close();
+	}
+
+	
+}

Modified: incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java Fri Sep 21 11:48:05 2012
@@ -51,72 +51,81 @@ import org.openoffice.test.vcl.widgets.V
  */
 public class UIMap {
 	private static IDList idList = new IDList(new File("./hid"));
-
+	
+	public static final OpenOffice aoo = new OpenOffice();
+	
+	static {
+		aoo.setAutomationPort(OpenOffice.DEFAULT_AUTOMATION_PORT);
+		aoo.addArgs("-norestore", "-quickstart=no");
+		aoo.addRegistryModifications("<item oor:path=\"/org.openoffice.Office.Common/Misc\"><prop oor:name=\"UseSystemFileDialog\" oor:op=\"fuse\"><value>false</value></prop></item>",
+				"<item oor:path=\"/org.openoffice.Office.Common/Security/Scripting\"><prop oor:name=\"MacroSecurityLevel\" oor:op=\"fuse\"><value>0</value></prop></item>");
+	}
+	
+	public static final VclApp app = new VclApp(aoo);
+	
 	public static VclEditBox editbox(String id) {
-		return new VclEditBox(idList.getId(id));
+		return new VclEditBox(app, idList.getId(id));
 	}
 
 	public static VclControl control(String id) {
-		return new VclControl(idList.getId(id));
+		return new VclControl(app, idList.getId(id));
 	}
 
 	public static VclWindow window(String id) {
-		return new VclWindow(idList.getId(id));
+		return new VclWindow(app, idList.getId(id));
 	}
 
 	public static VclDialog dialog(String id) {
-		return new VclDialog(idList.getId(id));
+		return new VclDialog(app, idList.getId(id));
 	}
 
 	public static VclTabPage tabpage(String id) {
-		return new VclTabPage(idList.getId(id));
+		return new VclTabPage(app, idList.getId(id));
 	}
 
 	public static VclListBox listbox(String id) {
-		return new VclListBox(idList.getId(id));
+		return new VclListBox(app, idList.getId(id));
 	}
 
 	public static VclComboBox combobox(String id) {
-		return new VclComboBox(idList.getId(id));
+		return new VclComboBox(app, idList.getId(id));
 	}
 
 	public static VclToolBox toolbox(String id) {
-		return new VclToolBox(idList.getId(id));
+		return new VclToolBox(app, idList.getId(id));
 	}
 
 	public static VclButton button(String id) {
-		return new VclButton(idList.getId(id));
+		return new VclButton(app, idList.getId(id));
 	}
 
 	public static VclMessageBox msgbox(String text) {
-		return new VclMessageBox(idList.getId("UID_ACTIVE"), text);
+		return new VclMessageBox(app, idList.getId("UID_ACTIVE"), text);
 	}
 
 	public static VclMenuItem menuItem(String text) {
-		return new VclMenuItem(text);
+		return new VclMenuItem(app, text);
 	}
 
 	public static VclStatusBar statusbar(String id) {
-		return new VclStatusBar(idList.getId(id));
+		return new VclStatusBar(app, idList.getId(id));
 	}
 
 	public static VclField field(String id) {
-		return new VclField(idList.getId(id));
+		return new VclField(app, idList.getId(id));
 	}
 
 	public static VclDockingWin dockingwin(String id) {
-		return new VclDockingWin(idList.getId(id));
+		return new VclDockingWin(app, idList.getId(id));
 	}
 
 	public static VclTreeListBox tree(String id) {
-		return new VclTreeListBox(idList.getId(id));
+		return new VclTreeListBox(app, idList.getId(id));
 	}
 
-	public static final OpenOffice aoo = new OpenOffice(null);
-	public static final VclMessageBox activeMsgBox = new VclMessageBox(Constant.UID_ACTIVE);
-	public static final VclMessageBox msgBox_AdditionalRowsNotSaved = new VclMessageBox(Constant.UID_ACTIVE, "Additional rows were not saved.");
-	public static final VclTabControl activeTabControl = new VclTabControl(Constant.UID_ACTIVE);
-	public static final VclApp app = VclApp.getDefault();
+	public static final VclMessageBox activeMsgBox = new VclMessageBox(app, Constant.UID_ACTIVE);
+	public static final VclMessageBox msgBox_AdditionalRowsNotSaved = new VclMessageBox(app, Constant.UID_ACTIVE, "Additional rows were not saved.");
+	public static final VclTabControl activeTabControl = new VclTabControl(app, Constant.UID_ACTIVE);
 	public static final VclWindow writer = window("SW_HID_EDIT_WIN");
 	public static final VclWindow startcenter = window("FWK_HID_BACKINGWINDOW");
 	public static final VclWindow calc = window("SC_HID_SC_WIN_GRIDWIN");
@@ -502,15 +511,15 @@ public class UIMap {
 	public static final VclField swTableCellSplitNumber = field("cui:NumericField:RID_SVX_SPLITCELLDLG:ED_COUNT");
 	public static final VclButton swTableCellSplitHORZButton = button("cui:ImageRadioButton:RID_SVX_SPLITCELLDLG:RB_HORZ");
 	public static final VclButton swTableCellSplitVERTButton = button("cui:ImageRadioButton:RID_SVX_SPLITCELLDLG:RB_VERT");
-	public static final VclMenuItem swTableSelectRowMenu=new VclMenuItem("Row->Select");
-	public static final VclMenuItem swTableInsertRowMenu=new VclMenuItem("Row->Insert...");
-	public static final VclMenuItem swTableRowHeightMenu=new VclMenuItem("Row->Height...");
-	public static final VclMenuItem swTableRowDleteMenu=new VclMenuItem("Row->Delete");
-	public static final VclMenuItem swTableColumnWidthMenu=new VclMenuItem("Column->Width...");
-	public static final VclMenuItem swTableColumnSelectMenu=new VclMenuItem("Column->Select");
-	public static final VclMenuItem swTableColumnDeleteMenu=new VclMenuItem("Column->Delete");
-	public static final VclMenuItem swTableColumnInsertMenu=new VclMenuItem("Column->Insert...");
-	public static final VclMenuItem swTableCellSplitMenu=new VclMenuItem("Cell->Split...");
+	public static final VclMenuItem swTableSelectRowMenu=menuItem("Row->Select");
+	public static final VclMenuItem swTableInsertRowMenu=menuItem("Row->Insert...");
+	public static final VclMenuItem swTableRowHeightMenu=menuItem("Row->Height...");
+	public static final VclMenuItem swTableRowDleteMenu=menuItem("Row->Delete");
+	public static final VclMenuItem swTableColumnWidthMenu=menuItem("Column->Width...");
+	public static final VclMenuItem swTableColumnSelectMenu=menuItem("Column->Select");
+	public static final VclMenuItem swTableColumnDeleteMenu=menuItem("Column->Delete");
+	public static final VclMenuItem swTableColumnInsertMenu=menuItem("Column->Insert...");
+	public static final VclMenuItem swTableCellSplitMenu=menuItem("Cell->Split...");
 	public static final VclListBox sdTableBACGColorListbox = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR");
 	public static final VclTabPage sdTableBACGColorArea = tabpage("CUI_HID_AREA_AREA");
 	public static final VclTabPage sdTableBACGColorsOption = tabpage("CUI_HID_OPTIONS_COLOR");

Modified: incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java (original)
+++ incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java Fri Sep 21 11:48:05 2012
@@ -62,8 +62,15 @@ public class UnoApp {
 	
 	private int reconnectCount = 10;
 	
+	private static OpenOffice defaultOpenOffice = null;
+	
+	static {
+		defaultOpenOffice = new OpenOffice();
+		defaultOpenOffice.setUnoUrl(OpenOffice.DEFAULT_UNO_URL);
+	}
+	
 	public UnoApp() {
-		this.openOffice = OpenOffice.getDefault();
+		this.openOffice = defaultOpenOffice;
 	}
 	
 	public UnoApp(OpenOffice openOffice) {

Modified: incubator/ooo/trunk/test/testuno/source/testcase/mix/MixedTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/mix/MixedTest.java?rev=1388443&r1=1388442&r2=1388443&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/mix/MixedTest.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/mix/MixedTest.java Fri Sep 21 11:48:05 2012
@@ -4,6 +4,7 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.openoffice.test.OpenOffice;
 import org.openoffice.test.uno.UnoApp;
 import org.openoffice.test.vcl.widgets.VclApp;
 import org.openoffice.test.vcl.widgets.VclListBox;
@@ -22,17 +23,26 @@ import com.sun.star.uno.UnoRuntime;
  *
  */
 public class MixedTest {
-	UnoApp unoApp = new UnoApp();
-	VclApp vclApp = new VclApp();
-	VclWindow writer = new VclWindow("SW_HID_EDIT_WIN");
-	VclTabPage effectsPage = new VclTabPage("CUI_HID_SVXPAGE_CHAR_EFFECTS");
-	VclListBox colorList = new VclListBox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR");
-	XTextDocument textDocument = null;
+	OpenOffice aoo;
+	UnoApp unoApp;
+	VclApp vclApp;
+	VclWindow writer;
+	VclTabPage effectsPage;
+	VclListBox colorList;
+	XTextDocument textDocument;
 	/**
 	 * @throws java.lang.Exception
 	 */
 	@Before
 	public void setUp() throws Exception {
+		OpenOffice aoo = new OpenOffice();
+		aoo.setAutomationPort(OpenOffice.DEFAULT_AUTOMATION_PORT);
+		aoo.setUnoUrl(OpenOffice.DEFAULT_UNO_URL);
+		unoApp = new UnoApp(aoo);
+		vclApp = new VclApp(aoo);
+		writer = new VclWindow(vclApp, "SW_HID_EDIT_WIN");
+		effectsPage = new VclTabPage(vclApp, "CUI_HID_SVXPAGE_CHAR_EFFECTS");
+		colorList = new VclListBox(vclApp, "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR");
 		unoApp.start();
 	}