Kaydet (Commit) 945abd8c authored tarafından Tomas O'Connor's avatar Tomas O'Connor

Updates to jSuite tests.

üst 9a5d8873
......@@ -2,9 +2,9 @@
*
* $RCSfile: SecurityDialogUtil.java,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change:$Date: 2003-02-26 09:56:36 $
* last change:$Date: 2003-03-25 11:26:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -124,7 +124,7 @@ public void run()
// wait for the message box to appear
try
{
Thread.currentThread().sleep(2000) ;
Thread.currentThread().sleep(4000) ;
}
catch (InterruptedException e)
{
......@@ -157,21 +157,21 @@ public void run()
XInterface oObj = null;
try
{
System.err.println("Name of the AccessibleContext:\n\t"+
xCon.getAccessibleName());
/* System.err.println("Name of the AccessibleContext:\n\t"+
xCon.getAccessibleName()); */
int count = xCon.getAccessibleChildCount();
System.err.println("Number of children: "+count);
// System.err.println("Number of children: "+count);
for (int i=0; i<count; i++) {
XAccessible xAcc = xCon.getAccessibleChild(i);
String name =
xAcc.getAccessibleContext().getAccessibleName();
System.out.println("Child "+i+": "+ name);
// System.out.println("Child "+i+": "+ name);
// check for button
if ( name.equals( btnName ) && ( UnoRuntime.queryInterface(
XButton.class, xAcc ) != null ) )
{
// System.out.println("Child "+i+": "+ name);
oObj = xAcc.getAccessibleContext();
break;
}
// check for checkbox
if ( checkBox && ( UnoRuntime.queryInterface( XCheckBox.class, xAcc ) != null ) )
......@@ -182,8 +182,8 @@ public void run()
(XAccessibleAction)UnoRuntime.queryInterface(
XAccessibleAction.class, xAcc.getAccessibleContext());
xAction.doAccessibleAction(0);
// might be worth using oObj2 to double check the new state??
break;
}
}
if (oObj == null) {
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: _XScriptInfo.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change:$Date: 2003-02-25 16:22:04 $
* last change:$Date: 2003-03-25 11:26:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: _XScriptInvocation.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change:$Date: 2003-03-05 15:29:36 $
* last change:$Date: 2003-03-25 11:26:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -59,7 +59,7 @@
*
************************************************************************/
package ifc.script.framework;
package ifc.script.framework.runtime;
import java.util.HashMap;
import java.util.Iterator;
......@@ -149,7 +149,9 @@ public class _XScriptInvocation extends MultiMethodTest {
log.println(description + ": " + logicalname);
try {
oObj.invoke(logicalname, params, args, num, result);
Object ret = oObj.invoke(logicalname, params, args, num, result);
log.println("return type is: " + ret.getClass().getName() +
", value is: " + ret.toString());
output = "success";
}
catch (com.sun.star.lang.IllegalArgumentException iae) {
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: _XScriptNameResolver.java,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change:$Date: 2003-03-05 15:29:36 $
* last change:$Date: 2003-03-25 11:26:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -59,7 +59,7 @@
*
************************************************************************/
package ifc.script.framework;
package ifc.script.framework.runtime;
import java.util.HashMap;
import java.util.Iterator;
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: _XScriptSecurity.java,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change:$Date: 2003-02-27 15:59:09 $
* last change:$Date: 2003-03-25 11:26:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -120,6 +120,10 @@ public class _XScriptSecurity extends MultiMethodTest {
result = false;
}
// set security to always without confirmation dialog and empty path
// list so other tests can run without dialog popping up
setSecurity(2, "false", "false", null);
tRes.tested("checkPermission()", result);
}
......@@ -150,6 +154,8 @@ public class _XScriptSecurity extends MultiMethodTest {
String output = null;
log.println(description);
// get the officeBasic setting
int officeBasic = 0;
if( runmacro.equals("never") )
......@@ -172,10 +178,6 @@ public class _XScriptSecurity extends MultiMethodTest {
String uri = util.utils.getFullTestURL(location);
secureURLs = uri.substring(0, uri.lastIndexOf('/'));
}
else if ( pathlist.equals("false") )
{
secureURLs = "";
}
if ( !setSecurity( officeBasic, confirm, warning, secureURLs ) )
{
......@@ -207,6 +209,14 @@ public class _XScriptSecurity extends MultiMethodTest {
output = "false";
}
}
catch (com.sun.star.security.AccessControlException ace) {
log.println("Couldn't invoke script:" + ace);
output = "com.sun.star.security.AccessControlException";
}
catch (com.sun.star.lang.IllegalArgumentException iae) {
log.println("Couldn't invoke script:" + iae);
output = "com.sun.star.lang.IllegalArgumentException";
}
catch (com.sun.star.uno.RuntimeException re) {
log.println("Couldn't invoke script:" + re);
output = "com.sun.star.uno.RuntimeException";
......@@ -218,7 +228,7 @@ public class _XScriptSecurity extends MultiMethodTest {
if( checkpath.equals("true") )
{
String setPath = getPathList();
String expectedPath = "";
String expectedPath = "empty";
if( checkBoxStr.equals( "true" ) )
{
String uri = util.utils.getFullTestURL(location);
......@@ -267,10 +277,16 @@ public class _XScriptSecurity extends MultiMethodTest {
aArgs );
XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, oConfigUpdate );
result = (String) xPropertySet.getPropertyValue( "SecureURL" );
String[] paths = (String[])xPropertySet.getPropertyValue("SecureURL");
if (paths == null || paths.length == 0)
result = "empty";
else
result = paths[0];
} catch (Exception e)
{
result = "Exception getting list of secure URLs";
result = e.getClass().getName() + " getting list of secure URLs";
}
return result;
}
......@@ -306,12 +322,18 @@ public class _XScriptSecurity extends MultiMethodTest {
XChangesBatch xChangesBatch = (XChangesBatch)UnoRuntime.queryInterface(
XChangesBatch.class, oConfigUpdate );
Object[] aSecureURLs = new Object[1];
aSecureURLs[0]=secureURLs;
log.println("settting SecureURL");
Object[] aSecureURLs;
if (secureURLs == null) {
aSecureURLs = new Object[0];
}
else {
aSecureURLs = new Object[1];
aSecureURLs[0] = secureURLs;
}
log.println("setting SecureURL");
xNameReplace.replaceByName( "SecureURL", aSecureURLs );
log.println("settting OfficeBasic");
log.println("setting OfficeBasic");
xNameReplace.replaceByName( "OfficeBasic", new Integer(officeBasic) );
Boolean bConfirm = null;
......@@ -323,7 +345,7 @@ public class _XScriptSecurity extends MultiMethodTest {
{
bConfirm = new Boolean( false );
}
log.println("settting Confirmation");
log.println("setting Confirmation");
xNameReplace.replaceByName( "Confirmation", bConfirm );
Boolean bWarning = null;
......@@ -335,7 +357,7 @@ public class _XScriptSecurity extends MultiMethodTest {
{
bWarning = new Boolean( false );
}
log.println("settting Warning");
log.println("setting Warning");
xNameReplace.replaceByName( "Warning", bWarning );
// and now commit the changes
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: _XScriptStorageManager.java,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change:$Date: 2002-12-10 14:12:06 $
* last change:$Date: 2003-03-25 11:26:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -252,6 +252,7 @@ public class _XScriptStorageManager extends MultiMethodTest {
try {
String uri = util.utils.getFullTestURL(location);
log.println("calling refreshScriptStorage with URI: " + uri);
oObj.refreshScriptStorage(uri);
output = "success";
}
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: Dispatch.java,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change:$Date: 2003-02-25 16:22:06 $
* last change:$Date: 2003-03-25 11:26:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: Function.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change:$Date: 2003-02-25 16:22:07 $
* last change:$Date: 2003-03-25 11:26:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptInfo.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change:$Date: 2003-02-25 16:22:07 $
* last change:$Date: 2003-03-25 11:26:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptRuntimeManager.java,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change:$Date: 2002-12-10 14:12:41 $
* last change:$Date: 2003-03-25 11:26:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -82,7 +82,7 @@ public class ScriptRuntimeManager extends TestCase {
try {
oObj = (XInterface) Param.getMSF().createInstance
("drafts.com.sun.star.script.framework.ScriptRuntimeManager");
("drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager");
} catch (com.sun.star.uno.Exception e) {
throw new StatusException("Can't create object environment", e) ;
}
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: ScriptStorage.java,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change:$Date: 2003-02-25 16:22:08 $
* last change:$Date: 2003-03-25 11:26:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment