Removed Control-M characters

git-svn-id: svn://10.0.0.236/trunk@63911 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rpallath%eng.sun.com
2000-03-23 23:24:32 +00:00
parent df55a6d2bc
commit c2482c13ca
518 changed files with 26040 additions and 26040 deletions

View File

@@ -1,92 +1,92 @@
basic/scenario/1
basic/scenario/2
basic/scenario/3
basic/scenario/4
basic/scenario/5
basic/scenario/8
basic/scenario/9
basic/scenario/fr1
basic/scenario/fr2
basic/scenario/fr3
basic/params/Pluglet_createPlugletInstance_mimeType_1
basic/params/Pluglet_createPlugletInstance_mimeType_2
basic/params/Pluglet_createPlugletInstance_mimeType_3
basic/params/Pluglet_createPlugletInstance_mimeType_4
basic/params/Pluglet_createPlugletInstance_mimeType_5
basic/params/Pluglet_createPlugletInstance_mimeType_6
basic/params/PlugletStreamListener_onDataAvailable_input_1
basic/params/PlugletStreamListener_onDataAvailable_input_2
basic/params/PlugletStreamListener_onDataAvailable_input_3
basic/params/PlugletStreamListener_onDataAvailable_input_4
basic/params/PlugletStreamListener_onDataAvailable_input_5
basic/params/PlugletStreamListener_onDataAvailable_input_6
basic/params/PlugletStreamListener_onDataAvailable_input_7
basic/params/PlugletStreamListener_onDataAvailable_input_8
basic/params/PlugletStreamListener_onDataAvailable_input_9
basic/params/PlugletStreamListener_onDataAvailable_input_10
basic/returns/Pluglet_createPlugletInstance
basic/returns/PlugletInstance_newStream
basic/security/DeleteFileTest
basic/security/GetClipboardTest
basic/security/GetSysPropsTest
basic/security/OpenWinTest
basic/security/PrintTest
basic/security/ReadFileTest
basic/security/RemoteConnectTest
basic/security/RunProgramTest
basic/security/WriteFileTest
basic/security/automation/SecTestCanRead
basic/security/automation/SecTestCanWrite
basic/security/automation/SecTestClipboard
basic/security/automation/SecTestDelete
basic/security/automation/SecTestEnv
basic/security/automation/SecTestExists
basic/security/automation/SecTestFileDescriptorIn
basic/security/automation/SecTestFileDescriptorOut
basic/security/automation/SecTestFileInputStream
basic/security/automation/SecTestFileOutputStream
basic/security/automation/SecTestGetAbsolutePath
basic/security/automation/SecTestGetCanonicalPath
basic/security/automation/SecTestGetContent
basic/security/automation/SecTestGetParent
basic/security/automation/SecTestGetPath
basic/security/automation/SecTestGetProps
basic/security/automation/SecTestGetSecMgr
basic/security/automation/SecTestIsDirectory
basic/security/automation/SecTestIsFile
basic/security/automation/SecTestLastModified
basic/security/automation/SecTestLength
basic/security/automation/SecTestList
basic/security/automation/SecTestListJSFilter
basic/security/automation/SecTestMkdir
basic/security/automation/SecTestMkdirs
basic/security/automation/SecTestOpenConx
basic/security/automation/SecTestPrintStream
basic/security/automation/SecTestRandomAccess
basic/security/automation/SecTestRandomAccessRW
basic/security/automation/SecTestRenameTo
basic/security/automation/SecTestRunExec
basic/security/automation/SecTestRunExit
basic/security/automation/SecTestRunLoad
basic/security/automation/SecTestRunLoadLib
basic/security/automation/SecTestSetSecMgr
basic/security/automation/SecTestSocket
basic/security/automation/SecTestSysExit
basic/security/automation/SecTestURLFac
basic/security/automation/SecTestXAccept
basic/security/automation/SecTestXAccess
basic/security/automation/SecTestXAccessTG
basic/security/automation/SecTestXAccessTop
basic/security/automation/SecTestXCCL
basic/security/automation/SecTestXConn
basic/security/automation/SecTestXDelete
basic/security/automation/SecTestXExec
basic/security/automation/SecTestXExit
basic/security/automation/SecTestXLink
basic/security/automation/SecTestXListen
basic/security/automation/SecTestXPakAcc
basic/security/automation/SecTestXPakDef
basic/security/automation/SecTestXPropAcc
basic/security/automation/SecTestXRead
basic/security/automation/SecTestXSetFac
basic/security/automation/SecTestXWrite
basic/scenario/1
basic/scenario/2
basic/scenario/3
basic/scenario/4
basic/scenario/5
basic/scenario/8
basic/scenario/9
basic/scenario/fr1
basic/scenario/fr2
basic/scenario/fr3
basic/params/Pluglet_createPlugletInstance_mimeType_1
basic/params/Pluglet_createPlugletInstance_mimeType_2
basic/params/Pluglet_createPlugletInstance_mimeType_3
basic/params/Pluglet_createPlugletInstance_mimeType_4
basic/params/Pluglet_createPlugletInstance_mimeType_5
basic/params/Pluglet_createPlugletInstance_mimeType_6
basic/params/PlugletStreamListener_onDataAvailable_input_1
basic/params/PlugletStreamListener_onDataAvailable_input_2
basic/params/PlugletStreamListener_onDataAvailable_input_3
basic/params/PlugletStreamListener_onDataAvailable_input_4
basic/params/PlugletStreamListener_onDataAvailable_input_5
basic/params/PlugletStreamListener_onDataAvailable_input_6
basic/params/PlugletStreamListener_onDataAvailable_input_7
basic/params/PlugletStreamListener_onDataAvailable_input_8
basic/params/PlugletStreamListener_onDataAvailable_input_9
basic/params/PlugletStreamListener_onDataAvailable_input_10
basic/returns/Pluglet_createPlugletInstance
basic/returns/PlugletInstance_newStream
basic/security/DeleteFileTest
basic/security/GetClipboardTest
basic/security/GetSysPropsTest
basic/security/OpenWinTest
basic/security/PrintTest
basic/security/ReadFileTest
basic/security/RemoteConnectTest
basic/security/RunProgramTest
basic/security/WriteFileTest
basic/security/automation/SecTestCanRead
basic/security/automation/SecTestCanWrite
basic/security/automation/SecTestClipboard
basic/security/automation/SecTestDelete
basic/security/automation/SecTestEnv
basic/security/automation/SecTestExists
basic/security/automation/SecTestFileDescriptorIn
basic/security/automation/SecTestFileDescriptorOut
basic/security/automation/SecTestFileInputStream
basic/security/automation/SecTestFileOutputStream
basic/security/automation/SecTestGetAbsolutePath
basic/security/automation/SecTestGetCanonicalPath
basic/security/automation/SecTestGetContent
basic/security/automation/SecTestGetParent
basic/security/automation/SecTestGetPath
basic/security/automation/SecTestGetProps
basic/security/automation/SecTestGetSecMgr
basic/security/automation/SecTestIsDirectory
basic/security/automation/SecTestIsFile
basic/security/automation/SecTestLastModified
basic/security/automation/SecTestLength
basic/security/automation/SecTestList
basic/security/automation/SecTestListJSFilter
basic/security/automation/SecTestMkdir
basic/security/automation/SecTestMkdirs
basic/security/automation/SecTestOpenConx
basic/security/automation/SecTestPrintStream
basic/security/automation/SecTestRandomAccess
basic/security/automation/SecTestRandomAccessRW
basic/security/automation/SecTestRenameTo
basic/security/automation/SecTestRunExec
basic/security/automation/SecTestRunExit
basic/security/automation/SecTestRunLoad
basic/security/automation/SecTestRunLoadLib
basic/security/automation/SecTestSetSecMgr
basic/security/automation/SecTestSocket
basic/security/automation/SecTestSysExit
basic/security/automation/SecTestURLFac
basic/security/automation/SecTestXAccept
basic/security/automation/SecTestXAccess
basic/security/automation/SecTestXAccessTG
basic/security/automation/SecTestXAccessTop
basic/security/automation/SecTestXCCL
basic/security/automation/SecTestXConn
basic/security/automation/SecTestXDelete
basic/security/automation/SecTestXExec
basic/security/automation/SecTestXExit
basic/security/automation/SecTestXLink
basic/security/automation/SecTestXListen
basic/security/automation/SecTestXPakAcc
basic/security/automation/SecTestXPakDef
basic/security/automation/SecTestXPropAcc
basic/security/automation/SecTestXRead
basic/security/automation/SecTestXSetFac
basic/security/automation/SecTestXWrite

View File

@@ -18,10 +18,10 @@
*
* Contributor(s):
*/
package org.mozilla.pluglet.test.basic;
public interface Test {
public void execute(TestContext context);
}
package org.mozilla.pluglet.test.basic;
public interface Test {
public void execute(TestContext context);
}

View File

@@ -20,315 +20,315 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import java.io.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.util.*;
public class TestContext {
public static String TEST_PARAMETERS_FILE_NAME = "TestProperties";
public static String COMMON_PROPERTIES_FILE_NAME = "CommonProperties";
public static String START_PROPERTIES_FILE_NAME = "StartProperties";
public static String LOG_FILE_NAME_PROP_NAME = "LOG_FILE";
public static String RESULT_FILE_NAME_PROP_NAME = "RESULT_FILE";
public static String TEST_TOP_DIR_PROP_NAME = "TEST_TOP_DIR";
public static String TEST_DIR_PROP_NAME = "TEST_DIR";
public static int FAILED = 0;
public static int NOT_DEF = 1;
public static int PASSED = 3;
private static String logFile;
private static String resFile;
private static int result = NOT_DEF;
private static String tmpString;
private static String tmpFile;
private static boolean tmpFromStart;
TestLoaderPluglet plugletFactory = null;
String mimeType = null;
Pluglet plugletInstance = null;
PlugletStreamListener plugletStreamListener = null;
PlugletManager pm = null;
PlugletPeer peer = null;
PlugletStreamInfo plugletStreamInfo = null;
InputStream is = null;
int length;
String fileName = null;
int status;
int streamType;
TestStage stage = null;
TestDescr descr = null;
Vector parameters = null;
Properties props = new Properties();
public TestContext() {
}
public void initialize() {
try {
File propsFile = new File(START_PROPERTIES_FILE_NAME);
props.load(new FileInputStream(propsFile));
propsFile = new File(getTopDir() + "/config/" + COMMON_PROPERTIES_FILE_NAME);
props.load(new FileInputStream(propsFile));
logFile = props.getProperty(LOG_FILE_NAME_PROP_NAME);
resFile = props.getProperty(RESULT_FILE_NAME_PROP_NAME);
propsFile = new File(getTestDir() + "/" + TEST_PARAMETERS_FILE_NAME);
props.load(new FileInputStream(propsFile));
} catch (Exception e) {
printLog("Cann't load properties file - exception:");
printLog(e.getMessage());
e.printStackTrace();
}
descr = new TestDescr();
descr.initialize(props, this);
}
public TestContext getCopy() {
TestContext tc = new TestContext();
tc.plugletFactory = this.plugletFactory;
tc.plugletInstance = this.plugletInstance;
tc.plugletStreamListener = this.plugletStreamListener;
tc.pm = this.pm;
tc.peer = this.peer;
tc.plugletStreamInfo = this.plugletStreamInfo;
tc.is = this.is;
tc.length = this.length;
tc.status = this.status;
tc.stage = this.stage;
tc.descr = this.descr;
tc.parameters = this.parameters;
tc.props = props;
return tc;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public String getMimeType() {
return mimeType;
}
public void setPlugletFactory(TestLoaderPluglet plugletFactory) {
this.plugletFactory = plugletFactory;
}
public PlugletFactory getPlugletFactory() {
return plugletFactory;
}
public void setPlugletManager(PlugletManager pm) {
this.pm = pm;
}
public PlugletManager getPlugletManager() {
return pm;
}
public void setPluglet(Pluglet plugletInstance) {
this.plugletInstance = plugletInstance;
}
public Pluglet getPluglet() {
return plugletInstance;
}
public void setPlugletStreamListener(PlugletStreamListener plugletStreamListener) {
this.plugletStreamListener = plugletStreamListener;
}
public PlugletStreamListener getPlugletStreamListener() {
return plugletStreamListener;
}
public void setPlugletPeer(PlugletPeer peer) {
this.peer = peer;
}
public PlugletPeer getPlugletPeer() {
return peer;
}
public void setTestStage(TestStage stage) {
this.stage = stage;
}
public TestStage getTestStage() {
return stage;
}
public TestDescr getTestDescr() {
return descr;
}
public void setPlugletStreamInfo(PlugletStreamInfo plugletStreamInfo){
this.plugletStreamInfo = plugletStreamInfo;
}
public PlugletStreamInfo getPlugletStreamInfo(){
return plugletStreamInfo;
}
public void setStatus(int status){
this.status = status;
}
public int getStatus(){
return status;
}
public void setInputStream(InputStream is) {
this.is = is;
}
public InputStream getInputStream() {
return is;
}
public void setLength(int length) {
this.length = length;
}
public int getLength() {
return length;
}
public void setFileName(String fileName){
this.fileName = fileName;
}
public String getFileName(){
return fileName;
}
public void setStreamType(int streamType) {
this.streamType = streamType;
}
public int getStreamType() {
return streamType;
}
// nb: move to TestDescr
public void setParameters(Vector parameters){
this.parameters = parameters;
}
public Vector getParameters(){
return parameters;
}
public static Pluglet getOtherPluglet(){
return null;
}
public String getTopDir() {
return props.getProperty(TEST_TOP_DIR_PROP_NAME);
}
public String getTestDir() {
return props.getProperty(TEST_DIR_PROP_NAME);
}
public String getProperty(String propName){
return props.getProperty(propName);
}
public TestStage getStageByPropertyName(String propName) {
String stageName = props.getProperty(propName);
if (stageName == null) {
printLog(propName + " isn't set");
return null;
} else {
TestStage stage = TestStage.getStageByName(stageName);
if (stage == null) {
printLog(propName +" is set into non-existent value");
return null;
}
return stage;
}
}
public static void registerIfNotRegistered(int res) {
if (result == NOT_DEF){
if (res == FAILED) {
registerFAILED("By checking thread");
} else {
registerPASSED("By checking thread");
}
}
}
public static void registerFAILED(String comment) {
result = FAILED;
appendToFile(logFile, "FAILED: "+comment+"\n", false);
appendToFile(resFile, "FAILED\n", true);
}
public static void registerPASSED(String comment) {
if (result == NOT_DEF) {
result = PASSED;
appendToFile(logFile, "PASSED: "+comment+"\n", false);
appendToFile(resFile, "PASSED\n", true);
}
}
public static boolean failedIsRegistered(){
return (result == FAILED);
}
public static void printLog(String logStr) {
appendToFile(logFile, logStr+"\n", false);
}
private static void appendToFile(String file, String str, boolean fromStart) {
tmpString = str;
tmpFile = file;
tmpFromStart = fromStart;
java.security.AccessController
.doPrivileged(new java.security.PrivilegedAction(){
public Object run(){
try {
RandomAccessFile f = new RandomAccessFile(tmpFile, "rw");
if (tmpFromStart) {
f.seek(0);
} else {
long length = f.length();
f.seek(length);
}
f.writeBytes(tmpString);
f.close();
} catch (IOException e) {
DebugPluglet.print("IOException appending to file "+tmpFile);
DebugPluglet.print(e.toString());
}
return null;
}
});
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import java.io.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.util.*;
public class TestContext {
public static String TEST_PARAMETERS_FILE_NAME = "TestProperties";
public static String COMMON_PROPERTIES_FILE_NAME = "CommonProperties";
public static String START_PROPERTIES_FILE_NAME = "StartProperties";
public static String LOG_FILE_NAME_PROP_NAME = "LOG_FILE";
public static String RESULT_FILE_NAME_PROP_NAME = "RESULT_FILE";
public static String TEST_TOP_DIR_PROP_NAME = "TEST_TOP_DIR";
public static String TEST_DIR_PROP_NAME = "TEST_DIR";
public static int FAILED = 0;
public static int NOT_DEF = 1;
public static int PASSED = 3;
private static String logFile;
private static String resFile;
private static int result = NOT_DEF;
private static String tmpString;
private static String tmpFile;
private static boolean tmpFromStart;
TestLoaderPluglet plugletFactory = null;
String mimeType = null;
Pluglet plugletInstance = null;
PlugletStreamListener plugletStreamListener = null;
PlugletManager pm = null;
PlugletPeer peer = null;
PlugletStreamInfo plugletStreamInfo = null;
InputStream is = null;
int length;
String fileName = null;
int status;
int streamType;
TestStage stage = null;
TestDescr descr = null;
Vector parameters = null;
Properties props = new Properties();
public TestContext() {
}
public void initialize() {
try {
File propsFile = new File(START_PROPERTIES_FILE_NAME);
props.load(new FileInputStream(propsFile));
propsFile = new File(getTopDir() + "/config/" + COMMON_PROPERTIES_FILE_NAME);
props.load(new FileInputStream(propsFile));
logFile = props.getProperty(LOG_FILE_NAME_PROP_NAME);
resFile = props.getProperty(RESULT_FILE_NAME_PROP_NAME);
propsFile = new File(getTestDir() + "/" + TEST_PARAMETERS_FILE_NAME);
props.load(new FileInputStream(propsFile));
} catch (Exception e) {
printLog("Cann't load properties file - exception:");
printLog(e.getMessage());
e.printStackTrace();
}
descr = new TestDescr();
descr.initialize(props, this);
}
public TestContext getCopy() {
TestContext tc = new TestContext();
tc.plugletFactory = this.plugletFactory;
tc.plugletInstance = this.plugletInstance;
tc.plugletStreamListener = this.plugletStreamListener;
tc.pm = this.pm;
tc.peer = this.peer;
tc.plugletStreamInfo = this.plugletStreamInfo;
tc.is = this.is;
tc.length = this.length;
tc.status = this.status;
tc.stage = this.stage;
tc.descr = this.descr;
tc.parameters = this.parameters;
tc.props = props;
return tc;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public String getMimeType() {
return mimeType;
}
public void setPlugletFactory(TestLoaderPluglet plugletFactory) {
this.plugletFactory = plugletFactory;
}
public PlugletFactory getPlugletFactory() {
return plugletFactory;
}
public void setPlugletManager(PlugletManager pm) {
this.pm = pm;
}
public PlugletManager getPlugletManager() {
return pm;
}
public void setPluglet(Pluglet plugletInstance) {
this.plugletInstance = plugletInstance;
}
public Pluglet getPluglet() {
return plugletInstance;
}
public void setPlugletStreamListener(PlugletStreamListener plugletStreamListener) {
this.plugletStreamListener = plugletStreamListener;
}
public PlugletStreamListener getPlugletStreamListener() {
return plugletStreamListener;
}
public void setPlugletPeer(PlugletPeer peer) {
this.peer = peer;
}
public PlugletPeer getPlugletPeer() {
return peer;
}
public void setTestStage(TestStage stage) {
this.stage = stage;
}
public TestStage getTestStage() {
return stage;
}
public TestDescr getTestDescr() {
return descr;
}
public void setPlugletStreamInfo(PlugletStreamInfo plugletStreamInfo){
this.plugletStreamInfo = plugletStreamInfo;
}
public PlugletStreamInfo getPlugletStreamInfo(){
return plugletStreamInfo;
}
public void setStatus(int status){
this.status = status;
}
public int getStatus(){
return status;
}
public void setInputStream(InputStream is) {
this.is = is;
}
public InputStream getInputStream() {
return is;
}
public void setLength(int length) {
this.length = length;
}
public int getLength() {
return length;
}
public void setFileName(String fileName){
this.fileName = fileName;
}
public String getFileName(){
return fileName;
}
public void setStreamType(int streamType) {
this.streamType = streamType;
}
public int getStreamType() {
return streamType;
}
// nb: move to TestDescr
public void setParameters(Vector parameters){
this.parameters = parameters;
}
public Vector getParameters(){
return parameters;
}
public static Pluglet getOtherPluglet(){
return null;
}
public String getTopDir() {
return props.getProperty(TEST_TOP_DIR_PROP_NAME);
}
public String getTestDir() {
return props.getProperty(TEST_DIR_PROP_NAME);
}
public String getProperty(String propName){
return props.getProperty(propName);
}
public TestStage getStageByPropertyName(String propName) {
String stageName = props.getProperty(propName);
if (stageName == null) {
printLog(propName + " isn't set");
return null;
} else {
TestStage stage = TestStage.getStageByName(stageName);
if (stage == null) {
printLog(propName +" is set into non-existent value");
return null;
}
return stage;
}
}
public static void registerIfNotRegistered(int res) {
if (result == NOT_DEF){
if (res == FAILED) {
registerFAILED("By checking thread");
} else {
registerPASSED("By checking thread");
}
}
}
public static void registerFAILED(String comment) {
result = FAILED;
appendToFile(logFile, "FAILED: "+comment+"\n", false);
appendToFile(resFile, "FAILED\n", true);
}
public static void registerPASSED(String comment) {
if (result == NOT_DEF) {
result = PASSED;
appendToFile(logFile, "PASSED: "+comment+"\n", false);
appendToFile(resFile, "PASSED\n", true);
}
}
public static boolean failedIsRegistered(){
return (result == FAILED);
}
public static void printLog(String logStr) {
appendToFile(logFile, logStr+"\n", false);
}
private static void appendToFile(String file, String str, boolean fromStart) {
tmpString = str;
tmpFile = file;
tmpFromStart = fromStart;
java.security.AccessController
.doPrivileged(new java.security.PrivilegedAction(){
public Object run(){
try {
RandomAccessFile f = new RandomAccessFile(tmpFile, "rw");
if (tmpFromStart) {
f.seek(0);
} else {
long length = f.length();
f.seek(length);
}
f.writeBytes(tmpString);
f.close();
} catch (IOException e) {
DebugPluglet.print("IOException appending to file "+tmpFile);
DebugPluglet.print(e.toString());
}
return null;
}
});
}
}

View File

@@ -20,116 +20,116 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class TestDescr {
public static String DELAY_PROP_NAME = "DELAY";
public static String RUN_STAGES_PROP_NAME = "RUN_STAGES";
public static String TEST_CLASS_PROP_NAME = "TEST_CLASS";
public static String ITERATOR_CLASS_PROP_NAME = "ITERATOR_CLASS";
Class testClass = null;
Class iteratorClass = null;
Test testInstance = null;
TestContext context = null;
Vector runStages = new Vector();
public TestDescr() {
}
public void initialize(Properties props, TestContext context){
this.context = context;
String stagesStr;
stagesStr = props.getProperty(RUN_STAGES_PROP_NAME);
if (stagesStr != null) {
StringTokenizer st = new StringTokenizer(stagesStr);
TestStage stage = null;
System.out.println(stagesStr);
while (st.hasMoreTokens()) {
stage = TestStage.getStageByName(st.nextToken());
if (stage != null) {
runStages.add(stage);
} else {
;//nb
}
}
} else {
;//nb
}
String testClassName = props.getProperty(TEST_CLASS_PROP_NAME);
try {
testClass = Class.forName(testClassName);
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("No test class name");
}
String iteratorClassName = props.getProperty(ITERATOR_CLASS_PROP_NAME);
if (iteratorClassName != null) {
try {
iteratorClass = Class.forName(iteratorClassName);
} catch (Exception e) {
TestContext.registerFAILED("Incorrectly specified iterator class name");
}
try {
testInstance = new IterTest(testClass, (TestListIterator)iteratorClass.newInstance());
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate iterator class");
}
} else {
try {
testInstance = (Test)testClass.newInstance();
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate test class");
}
}
}
public Test getTestInstance(TestStage stage) {
//System.out.println("the stage value is "+stage.getName());
if (runStages.indexOf(stage) > -1) {
return testInstance;
} else {
return null;
}
}
}
class IterTest implements Test {
Class testClass = null;
TestListIterator iterator = null;
public IterTest(Class testClass, TestListIterator iterator) {
this.testClass = testClass;
this.iterator = iterator;
}
public void execute (TestContext context) {
if (iterator.initialize(context)) {
while(iterator.next()) {
try{
((Test)testClass.newInstance()).execute(context);
System.out.println("Executing");
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate/execute test");
break;
}
}
} else {
TestContext.registerFAILED("Cann't initialize iterator");
}
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class TestDescr {
public static String DELAY_PROP_NAME = "DELAY";
public static String RUN_STAGES_PROP_NAME = "RUN_STAGES";
public static String TEST_CLASS_PROP_NAME = "TEST_CLASS";
public static String ITERATOR_CLASS_PROP_NAME = "ITERATOR_CLASS";
Class testClass = null;
Class iteratorClass = null;
Test testInstance = null;
TestContext context = null;
Vector runStages = new Vector();
public TestDescr() {
}
public void initialize(Properties props, TestContext context){
this.context = context;
String stagesStr;
stagesStr = props.getProperty(RUN_STAGES_PROP_NAME);
if (stagesStr != null) {
StringTokenizer st = new StringTokenizer(stagesStr);
TestStage stage = null;
System.out.println(stagesStr);
while (st.hasMoreTokens()) {
stage = TestStage.getStageByName(st.nextToken());
if (stage != null) {
runStages.add(stage);
} else {
;//nb
}
}
} else {
;//nb
}
String testClassName = props.getProperty(TEST_CLASS_PROP_NAME);
try {
testClass = Class.forName(testClassName);
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("No test class name");
}
String iteratorClassName = props.getProperty(ITERATOR_CLASS_PROP_NAME);
if (iteratorClassName != null) {
try {
iteratorClass = Class.forName(iteratorClassName);
} catch (Exception e) {
TestContext.registerFAILED("Incorrectly specified iterator class name");
}
try {
testInstance = new IterTest(testClass, (TestListIterator)iteratorClass.newInstance());
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate iterator class");
}
} else {
try {
testInstance = (Test)testClass.newInstance();
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate test class");
}
}
}
public Test getTestInstance(TestStage stage) {
//System.out.println("the stage value is "+stage.getName());
if (runStages.indexOf(stage) > -1) {
return testInstance;
} else {
return null;
}
}
}
class IterTest implements Test {
Class testClass = null;
TestListIterator iterator = null;
public IterTest(Class testClass, TestListIterator iterator) {
this.testClass = testClass;
this.iterator = iterator;
}
public void execute (TestContext context) {
if (iterator.initialize(context)) {
while(iterator.next()) {
try{
((Test)testClass.newInstance()).execute(context);
System.out.println("Executing");
} catch (Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Cann't instantiate/execute test");
break;
}
}
} else {
TestContext.registerFAILED("Cann't initialize iterator");
}
}
}

View File

@@ -20,91 +20,91 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestInstance implements Pluglet{
TestContext context = null;
public TestInstance(TestContext context){
this.context = context;
context.setPluglet(this);
}
public void initialize(PlugletPeer peer) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_INITIALIZE));
context.setPlugletPeer(peer);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void start() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_START));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void stop() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_STOP));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void destroy() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_DESTROY));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public PlugletStreamListener newStream() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_NEW_STREAM));
context.setPlugletStreamListener(new TestStreamListener(context.getCopy()));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getPlugletStreamListener();
}
public void setWindow(Frame frame) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_SET_WINDOW));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void print(PrinterJob printerJob) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_PRINT));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestInstance implements Pluglet{
TestContext context = null;
public TestInstance(TestContext context){
this.context = context;
context.setPluglet(this);
}
public void initialize(PlugletPeer peer) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_INITIALIZE));
context.setPlugletPeer(peer);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void start() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_START));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void stop() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_STOP));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void destroy() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_DESTROY));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public PlugletStreamListener newStream() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_NEW_STREAM));
context.setPlugletStreamListener(new TestStreamListener(context.getCopy()));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getPlugletStreamListener();
}
public void setWindow(Frame frame) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_SET_WINDOW));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void print(PrinterJob printerJob) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INSTANCE_PRINT));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
}

View File

@@ -20,14 +20,14 @@
*/
package org.mozilla.pluglet.test.basic;
public interface TestListIterator {
public boolean initialize(TestContext context);
public boolean next();
}
package org.mozilla.pluglet.test.basic;
public interface TestListIterator {
public boolean initialize(TestContext context);
public boolean next();
}

View File

@@ -20,91 +20,91 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestLoaderPluglet implements PlugletFactory {
public static String DELAY_INTERNAL_PROP_NAME = "DELAY_INTERNAL";
public static int defaultResult = TestContext.FAILED;
public TestContext context = new TestContext();
public TestLoaderPluglet(){
System.out.println("--TestLoaderPluglet()");
context.initialize();
context.setPlugletFactory(this);
try {
PlugletCheckingThread checkingThread =
new PlugletCheckingThread((new Integer(context.getProperty(DELAY_INTERNAL_PROP_NAME))).intValue()*1000);
checkingThread.start();
} catch (Exception e) {
TestContext.printLog(DELAY_INTERNAL_PROP_NAME+" props isn't correctly set");
}
}
public void initialize(PlugletManager manager) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INITIALIZE));
context.setPlugletManager(manager);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public Pluglet createPluglet(String mimeType) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_CREATE_PLUGLET_INSTANCE));
context.setMimeType(mimeType);
context.setPluglet(new TestInstance(context.getCopy()));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getPluglet();
}
public void shutdown() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_SHUTDOWN));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
}
class PlugletCheckingThread extends Thread {
int timeout = Integer.MAX_VALUE;
PlugletCheckingThread(int timeout){
this.timeout = timeout;
}
public void run(){
System.out.println("started thread to sleep "+timeout);
try {
sleep(timeout);
} catch (Exception e) {
TestContext.printLog("Checking thread had been interrupted");
}
TestContext.registerIfNotRegistered(TestLoaderPluglet.defaultResult);
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestLoaderPluglet implements PlugletFactory {
public static String DELAY_INTERNAL_PROP_NAME = "DELAY_INTERNAL";
public static int defaultResult = TestContext.FAILED;
public TestContext context = new TestContext();
public TestLoaderPluglet(){
System.out.println("--TestLoaderPluglet()");
context.initialize();
context.setPlugletFactory(this);
try {
PlugletCheckingThread checkingThread =
new PlugletCheckingThread((new Integer(context.getProperty(DELAY_INTERNAL_PROP_NAME))).intValue()*1000);
checkingThread.start();
} catch (Exception e) {
TestContext.printLog(DELAY_INTERNAL_PROP_NAME+" props isn't correctly set");
}
}
public void initialize(PlugletManager manager) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_INITIALIZE));
context.setPlugletManager(manager);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public Pluglet createPluglet(String mimeType) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_CREATE_PLUGLET_INSTANCE));
context.setMimeType(mimeType);
context.setPluglet(new TestInstance(context.getCopy()));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getPluglet();
}
public void shutdown() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_SHUTDOWN));
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
}
class PlugletCheckingThread extends Thread {
int timeout = Integer.MAX_VALUE;
PlugletCheckingThread(int timeout){
this.timeout = timeout;
}
public void run(){
System.out.println("started thread to sleep "+timeout);
try {
sleep(timeout);
} catch (Exception e) {
TestContext.printLog("Checking thread had been interrupted");
}
TestContext.registerIfNotRegistered(TestLoaderPluglet.defaultResult);
}
}

View File

@@ -1,3 +1,3 @@
RUN_STAGES=PLUGLET_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_9216
RUN_STAGES=PLUGLET_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_9216
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_Iterator

View File

@@ -20,96 +20,96 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class TestStage {
public static String NO_ANY_STAGE = "NO_ANY_STAGE";
public static String PLUGLET_INITIALIZE = "PLUGLET_INITIALIZE";
public static String PLUGLET_CREATE_PLUGLET_INSTANCE = "PLUGLET_CREATE_PLUGLET_INSTANCE";
public static String PLUGLET_SHUTDOWN = "PLUGLET_SHUTDOWN";
public static String PLUGLET_INSTANCE_INITIALIZE = "PLUGLET_INSTANCE_INITIALIZE";
public static String PLUGLET_INSTANCE_START = "PLUGLET_INSTANCE_START" ;
public static String PLUGLET_INSTANCE_NEW_STREAM = "PLUGLET_INSTANCE_NEW_STREAM";
public static String PLUGLET_INSTANCE_SET_WINDOW = "PLUGLET_INSTANCE_SET_WINDOW";
public static String PLUGLET_INSTANCE_PRINT = "PLUGLET_INSTANCE_PRINT";
public static String PLUGLET_INSTANCE_STOP = "PLUGLET_INSTANCE_STOP";
public static String PLUGLET_INSTANCE_DESTROY = "PLUGLET_INSTANCE_DESTROY";
public static String PLUGLET_STREAM_LISTENER_ON_START_BINDING = "PLUGLET_STREAM_LISTENER_ON_START_BINDING";
public static String PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE = "PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE";
public static String PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE = "PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE";
public static String PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE = "PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE";
public static String PLUGLET_STREAM_LISTENER_ON_STOP_BINDING = "PLUGLET_STREAM_LISTENER_ON_STOP_BINDING";
public static String ANY = "ANY";
static Hashtable names = new Hashtable();
static {
names.put(NO_ANY_STAGE, new TestStage(NO_ANY_STAGE));
names.put(PLUGLET_INITIALIZE, new TestStage(PLUGLET_INITIALIZE));
names.put(PLUGLET_CREATE_PLUGLET_INSTANCE, new TestStage(PLUGLET_CREATE_PLUGLET_INSTANCE));
names.put(PLUGLET_SHUTDOWN, new TestStage(PLUGLET_SHUTDOWN));
names.put(PLUGLET_INSTANCE_INITIALIZE, new TestStage(PLUGLET_INSTANCE_INITIALIZE));
names.put(PLUGLET_INSTANCE_START, new TestStage(PLUGLET_INSTANCE_START));
names.put(PLUGLET_INSTANCE_NEW_STREAM, new TestStage(PLUGLET_INSTANCE_NEW_STREAM));
names.put(PLUGLET_INSTANCE_SET_WINDOW, new TestStage(PLUGLET_INSTANCE_SET_WINDOW));
names.put(PLUGLET_INSTANCE_PRINT, new TestStage(PLUGLET_INSTANCE_PRINT));
names.put(PLUGLET_INSTANCE_STOP, new TestStage(PLUGLET_INSTANCE_STOP));
names.put(PLUGLET_INSTANCE_DESTROY, new TestStage(PLUGLET_INSTANCE_DESTROY));
names.put(PLUGLET_STREAM_LISTENER_ON_START_BINDING, new TestStage(PLUGLET_STREAM_LISTENER_ON_START_BINDING));
names.put(PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE, new TestStage(PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE));
names.put(PLUGLET_STREAM_LISTENER_ON_STOP_BINDING, new TestStage(PLUGLET_STREAM_LISTENER_ON_STOP_BINDING));
names.put(ANY, new TestStage(ANY));
}
private String id;
private TestStage(String id) {
this.id = id;
}
private String getId() {
return id;
}
public String getName() {
return id;
}
public static TestStage getStageById(String id) {
return (TestStage)names.get(id);
}
public static TestStage getStageByName(String name) {
return (TestStage)names.get(name.toUpperCase());
}
public boolean consist(TestStage stage) {
if (stage.getId().equals(this.id)) {
return true;
}
if (stage.getId().equals(TestStage.ANY)) {
return true;
}
return false;
}
public boolean equals(Object stage) {
//System.out.println("to test "+this.id+" and "+((TestStage)stage).getId());
if (stage != null) {
if (((TestStage)stage).getId().equals(this.id)) {
return true;
}
}
return false;
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class TestStage {
public static String NO_ANY_STAGE = "NO_ANY_STAGE";
public static String PLUGLET_INITIALIZE = "PLUGLET_INITIALIZE";
public static String PLUGLET_CREATE_PLUGLET_INSTANCE = "PLUGLET_CREATE_PLUGLET_INSTANCE";
public static String PLUGLET_SHUTDOWN = "PLUGLET_SHUTDOWN";
public static String PLUGLET_INSTANCE_INITIALIZE = "PLUGLET_INSTANCE_INITIALIZE";
public static String PLUGLET_INSTANCE_START = "PLUGLET_INSTANCE_START" ;
public static String PLUGLET_INSTANCE_NEW_STREAM = "PLUGLET_INSTANCE_NEW_STREAM";
public static String PLUGLET_INSTANCE_SET_WINDOW = "PLUGLET_INSTANCE_SET_WINDOW";
public static String PLUGLET_INSTANCE_PRINT = "PLUGLET_INSTANCE_PRINT";
public static String PLUGLET_INSTANCE_STOP = "PLUGLET_INSTANCE_STOP";
public static String PLUGLET_INSTANCE_DESTROY = "PLUGLET_INSTANCE_DESTROY";
public static String PLUGLET_STREAM_LISTENER_ON_START_BINDING = "PLUGLET_STREAM_LISTENER_ON_START_BINDING";
public static String PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE = "PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE";
public static String PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE = "PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE";
public static String PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE = "PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE";
public static String PLUGLET_STREAM_LISTENER_ON_STOP_BINDING = "PLUGLET_STREAM_LISTENER_ON_STOP_BINDING";
public static String ANY = "ANY";
static Hashtable names = new Hashtable();
static {
names.put(NO_ANY_STAGE, new TestStage(NO_ANY_STAGE));
names.put(PLUGLET_INITIALIZE, new TestStage(PLUGLET_INITIALIZE));
names.put(PLUGLET_CREATE_PLUGLET_INSTANCE, new TestStage(PLUGLET_CREATE_PLUGLET_INSTANCE));
names.put(PLUGLET_SHUTDOWN, new TestStage(PLUGLET_SHUTDOWN));
names.put(PLUGLET_INSTANCE_INITIALIZE, new TestStage(PLUGLET_INSTANCE_INITIALIZE));
names.put(PLUGLET_INSTANCE_START, new TestStage(PLUGLET_INSTANCE_START));
names.put(PLUGLET_INSTANCE_NEW_STREAM, new TestStage(PLUGLET_INSTANCE_NEW_STREAM));
names.put(PLUGLET_INSTANCE_SET_WINDOW, new TestStage(PLUGLET_INSTANCE_SET_WINDOW));
names.put(PLUGLET_INSTANCE_PRINT, new TestStage(PLUGLET_INSTANCE_PRINT));
names.put(PLUGLET_INSTANCE_STOP, new TestStage(PLUGLET_INSTANCE_STOP));
names.put(PLUGLET_INSTANCE_DESTROY, new TestStage(PLUGLET_INSTANCE_DESTROY));
names.put(PLUGLET_STREAM_LISTENER_ON_START_BINDING, new TestStage(PLUGLET_STREAM_LISTENER_ON_START_BINDING));
names.put(PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE, new TestStage(PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
names.put(PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE, new TestStage(PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE));
names.put(PLUGLET_STREAM_LISTENER_ON_STOP_BINDING, new TestStage(PLUGLET_STREAM_LISTENER_ON_STOP_BINDING));
names.put(ANY, new TestStage(ANY));
}
private String id;
private TestStage(String id) {
this.id = id;
}
private String getId() {
return id;
}
public String getName() {
return id;
}
public static TestStage getStageById(String id) {
return (TestStage)names.get(id);
}
public static TestStage getStageByName(String name) {
return (TestStage)names.get(name.toUpperCase());
}
public boolean consist(TestStage stage) {
if (stage.getId().equals(this.id)) {
return true;
}
if (stage.getId().equals(TestStage.ANY)) {
return true;
}
return false;
}
public boolean equals(Object stage) {
//System.out.println("to test "+this.id+" and "+((TestStage)stage).getId());
if (stage != null) {
if (((TestStage)stage).getId().equals(this.id)) {
return true;
}
}
return false;
}
}

View File

@@ -20,79 +20,79 @@
*/
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestStreamListener implements PlugletStreamListener {
TestContext context = null;
public TestStreamListener(TestContext context){
this.context = context;
context.setPlugletStreamListener(this);
}
public void onStartBinding(PlugletStreamInfo streamInfo) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_START_BINDING));
context.setPlugletStreamInfo(streamInfo);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onDataAvailable(PlugletStreamInfo streamInfo, InputStream input,int length) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE));
context.setPlugletStreamInfo(streamInfo);
context.setInputStream(input);
context.setLength(length);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onFileAvailable(PlugletStreamInfo streamInfo, String fileName) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
context.setPlugletStreamInfo(streamInfo);
context.setFileName(fileName);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onStopBinding(PlugletStreamInfo streamInfo,int status) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_STOP_BINDING));
context.setPlugletStreamInfo(streamInfo);
context.setStatus(status);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public int getStreamType() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE));
context.setStreamType(STREAM_TYPE_NORMAL);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getStreamType();
}
}
package org.mozilla.pluglet.test.basic;
import java.util.*;
import org.mozilla.util.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.awt.*;
import java.awt.print.*;
import java.io.*;
import java.net.URL;
public class TestStreamListener implements PlugletStreamListener {
TestContext context = null;
public TestStreamListener(TestContext context){
this.context = context;
context.setPlugletStreamListener(this);
}
public void onStartBinding(PlugletStreamInfo streamInfo) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_START_BINDING));
context.setPlugletStreamInfo(streamInfo);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onDataAvailable(PlugletStreamInfo streamInfo, InputStream input,int length) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE));
context.setPlugletStreamInfo(streamInfo);
context.setInputStream(input);
context.setLength(length);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onFileAvailable(PlugletStreamInfo streamInfo, String fileName) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_FILE_AVAILABLE));
context.setPlugletStreamInfo(streamInfo);
context.setFileName(fileName);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public void onStopBinding(PlugletStreamInfo streamInfo,int status) {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_ON_STOP_BINDING));
context.setPlugletStreamInfo(streamInfo);
context.setStatus(status);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
}
public int getStreamType() {
context.setTestStage(TestStage.getStageById(TestStage.PLUGLET_STREAM_LISTENER_GET_STREAM_TYPE));
context.setStreamType(STREAM_TYPE_NORMAL);
Test test = null;
test = context.getTestDescr().getTestInstance(context.getTestStage());
if (test !=null) {
test.execute(context);
}
return context.getStreamType();
}
}

View File

@@ -1,7 +1,7 @@
null_PlugletInstance'1, this_PlugletInstance'0, other_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0, FTP_URL_FOR_GET'0, MAILTO_URL_FOR_GET'1, FILE_URL_FOR_GET'1, FILE_WIN_URL_FOR_GET'1
null'0, _self'0, _parent'1, EXISTING_TARGET_FOR_GET'1, NONEXISTING_TARGET_FOR_GET'1
null_streamListener'1, current_streamListener'0, new_streamListener'1
null'1, CURRENT_ALT_HOST'0, OTHER_ALT_HOST'1, INCORRECT_ALT_HOST'1
null'0, CURRENT_REFERER_URL'0, HTTP_OTHER_REFERER_URL'1
null_PlugletInstance'1, this_PlugletInstance'0, other_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0, FTP_URL_FOR_GET'0, MAILTO_URL_FOR_GET'1, FILE_URL_FOR_GET'1, FILE_WIN_URL_FOR_GET'1
null'0, _self'0, _parent'1, EXISTING_TARGET_FOR_GET'1, NONEXISTING_TARGET_FOR_GET'1
null_streamListener'1, current_streamListener'0, new_streamListener'1
null'1, CURRENT_ALT_HOST'0, OTHER_ALT_HOST'1, INCORRECT_ALT_HOST'1
null'0, CURRENT_REFERER_URL'0, HTTP_OTHER_REFERER_URL'1
true'1, false'0

View File

@@ -1,184 +1,184 @@
0: null_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
1: null_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
2: null_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
3: null_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
4: null_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
5: null_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
6: null_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
7: null_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
8: this_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, null, false
9: this_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
10: this_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, null, false
11: this_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
12: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
13: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
14: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, null, false
15: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
16: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
17: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
18: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
19: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
20: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
21: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
22: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
23: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
24: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
25: this_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
26: this_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
27: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
28: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
29: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, null, false
30: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
31: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
32: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
33: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
34: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
35: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
36: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
37: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
38: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
39: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
40: this_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
41: this_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
42: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
43: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
44: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
45: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
46: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
47: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
48: this_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
49: this_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
50: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, null, false
51: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
52: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
53: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
54: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
55: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
56: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
57: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
58: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
59: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
60: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
61: this_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
62: this_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
63: this_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
64: this_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
65: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, null, false
66: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
67: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
68: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
69: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
70: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
71: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
72: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
73: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
74: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
75: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
76: this_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
77: this_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
78: this_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
79: this_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
80: this_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
81: this_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
82: this_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
83: this_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
84: this_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
85: this_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
86: this_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
87: this_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
88: this_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
89: this_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
90: this_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
91: this_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
92: this_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
93: this_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
94: this_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
95: this_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
96: other_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, null, false
97: other_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
98: other_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, null, false
99: other_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
100: other_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
101: other_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
102: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, null, false
103: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
104: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
105: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
106: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
107: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
108: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
109: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
110: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
111: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
112: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
113: other_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
114: other_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
115: other_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
116: other_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
117: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, null, false
118: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
119: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
120: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
121: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
122: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
123: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
124: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
125: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
126: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
127: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
128: other_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
129: other_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
130: other_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
131: other_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
132: other_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
133: other_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
134: other_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
135: other_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
136: other_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
137: other_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
138: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, null, false
139: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
140: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
141: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
142: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
143: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
144: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
145: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
146: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
147: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
148: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
149: other_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
150: other_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
151: other_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
152: other_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
153: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, null, false
154: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
155: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
156: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
157: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
158: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
159: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
160: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
161: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
162: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
163: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
164: other_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
165: other_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
166: other_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
167: other_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
168: other_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
169: other_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
170: other_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
171: other_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
172: other_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
173: other_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
174: other_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
175: other_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
176: other_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
177: other_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
178: other_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
179: other_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
180: other_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
181: other_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
182: other_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
183: other_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
0: null_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
1: null_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
2: null_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
3: null_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
4: null_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
5: null_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
6: null_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
7: null_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
8: this_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, null, false
9: this_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
10: this_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, null, false
11: this_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
12: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
13: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
14: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, null, false
15: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
16: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
17: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
18: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
19: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
20: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
21: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
22: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
23: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
24: this_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
25: this_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
26: this_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
27: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
28: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
29: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, null, false
30: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
31: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
32: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
33: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
34: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
35: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
36: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
37: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
38: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
39: this_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
40: this_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
41: this_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
42: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
43: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
44: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
45: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
46: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
47: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
48: this_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
49: this_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
50: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, null, false
51: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
52: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
53: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
54: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
55: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
56: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
57: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
58: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
59: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
60: this_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
61: this_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
62: this_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
63: this_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
64: this_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
65: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, null, false
66: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
67: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
68: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
69: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
70: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
71: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
72: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
73: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
74: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
75: this_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
76: this_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
77: this_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
78: this_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
79: this_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
80: this_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
81: this_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
82: this_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
83: this_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
84: this_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
85: this_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
86: this_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
87: this_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
88: this_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
89: this_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
90: this_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
91: this_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
92: this_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
93: this_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
94: this_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
95: this_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
96: other_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, null, false
97: other_PlugletInstance, null, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
98: other_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, null, false
99: other_PlugletInstance, null, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
100: other_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
101: other_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
102: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, null, false
103: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
104: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
105: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
106: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
107: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
108: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
109: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
110: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
111: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
112: other_PlugletInstance, HTTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
113: other_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
114: other_PlugletInstance, HTTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
115: other_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
116: other_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
117: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, null, false
118: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
119: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
120: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
121: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
122: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
123: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
124: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
125: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
126: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
127: other_PlugletInstance, HTTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
128: other_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
129: other_PlugletInstance, HTTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
130: other_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
131: other_PlugletInstance, HTTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
132: other_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
133: other_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
134: other_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
135: other_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
136: other_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, null, false
137: other_PlugletInstance, FTP_URL_FOR_GET, null, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
138: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, null, false
139: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, null, CURRENT_REFERER_URL, false
140: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, true
141: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
142: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
143: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
144: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
145: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, null, false
146: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
147: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, null, false
148: other_PlugletInstance, FTP_URL_FOR_GET, null, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
149: other_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, null, false
150: other_PlugletInstance, FTP_URL_FOR_GET, null, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
151: other_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, null, false
152: other_PlugletInstance, FTP_URL_FOR_GET, _self, null_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
153: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, null, false
154: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, null, CURRENT_REFERER_URL, false
155: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, true
156: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
157: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, true
158: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
159: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, HTTP_OTHER_REFERER_URL, false
160: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, null, false
161: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, OTHER_ALT_HOST, CURRENT_REFERER_URL, false
162: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, null, false
163: other_PlugletInstance, FTP_URL_FOR_GET, _self, current_streamListener, INCORRECT_ALT_HOST, CURRENT_REFERER_URL, false
164: other_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, null, false
165: other_PlugletInstance, FTP_URL_FOR_GET, _self, new_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
166: other_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, null, false
167: other_PlugletInstance, FTP_URL_FOR_GET, _parent, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
168: other_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
169: other_PlugletInstance, FTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
170: other_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, null, false
171: other_PlugletInstance, FTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
172: other_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
173: other_PlugletInstance, MAILTO_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
174: other_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
175: other_PlugletInstance, MAILTO_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
176: other_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
177: other_PlugletInstance, FILE_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
178: other_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
179: other_PlugletInstance, FILE_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
180: other_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, null, false
181: other_PlugletInstance, FILE_WIN_URL_FOR_GET, null, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false
182: other_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, null, false
183: other_PlugletInstance, FILE_WIN_URL_FOR_GET, _self, current_streamListener, CURRENT_ALT_HOST, CURRENT_REFERER_URL, false

View File

@@ -1,12 +1,12 @@
NONEXISTING_TARGET_FOR_GET=nonexist_target_for_get
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_OTHER_REFERER_URL=http://router/index.html
FILE_WIN_URL_FOR_GET=file:C:/TEMP/file_for_get
CURRENT_REFERER_URL=http://earth:11000/PlugletAPITests/PlugletManager_getURL.html
MAILTO_URL_FOR_GET=mailto:avm@sparc.spb.su
INCORRECT_ALT_HOST=no_ip_addr
HTTP_URL_FOR_GET=http://earth:11000/cgi-bin/get_url.cgi
FILE_URL_FOR_GET=file:/tmp/file_for_get
CURRENT_ALT_HOST=192.168.205.165
FTP_URL_FOR_GET=ftp://ftp.funet.fi
NONEXISTING_TARGET_FOR_GET=nonexist_target_for_get
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_OTHER_REFERER_URL=http://router/index.html
FILE_WIN_URL_FOR_GET=file:C:/TEMP/file_for_get
CURRENT_REFERER_URL=http://earth:11000/PlugletAPITests/PlugletManager_getURL.html
MAILTO_URL_FOR_GET=mailto:avm@sparc.spb.su
INCORRECT_ALT_HOST=no_ip_addr
HTTP_URL_FOR_GET=http://earth:11000/cgi-bin/get_url.cgi
FILE_URL_FOR_GET=file:/tmp/file_for_get
CURRENT_ALT_HOST=192.168.205.165
FTP_URL_FOR_GET=ftp://ftp.funet.fi
OTHER_ALT_HOST=192.168.205.182

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletManager_getURL
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_getURL
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -1,7 +1,7 @@
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0
null'0, _self'0, _parent'0, _top'0, EXISTING_TARGET_FOR_GET'1, NONEXISTING_TARGET_FOR_GET'1
null_streamListener'0
null'0
null'0
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0
null'0, _self'0, _parent'0, _top'0, EXISTING_TARGET_FOR_GET'1, NONEXISTING_TARGET_FOR_GET'1
null_streamListener'0
null'0
null'0
false'0

View File

@@ -1,10 +1,10 @@
0: this_PlugletInstance, null, null, null_streamListener, null, null, false
1: this_PlugletInstance, null, _self, null_streamListener, null, null, false
2: this_PlugletInstance, null, _parent, null_streamListener, null, null, false
3: this_PlugletInstance, null, _top, null_streamListener, null, null, false
4: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, null, null, false
5: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, null, null, false
6: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, null_streamListener, null, null, false
7: this_PlugletInstance, HTTP_URL_FOR_GET, _top, null_streamListener, null, null, false
8: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, null_streamListener, null, null, false
9: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, null_streamListener, null, null, false
0: this_PlugletInstance, null, null, null_streamListener, null, null, false
1: this_PlugletInstance, null, _self, null_streamListener, null, null, false
2: this_PlugletInstance, null, _parent, null_streamListener, null, null, false
3: this_PlugletInstance, null, _top, null_streamListener, null, null, false
4: this_PlugletInstance, HTTP_URL_FOR_GET, null, null_streamListener, null, null, false
5: this_PlugletInstance, HTTP_URL_FOR_GET, _self, null_streamListener, null, null, false
6: this_PlugletInstance, HTTP_URL_FOR_GET, _parent, null_streamListener, null, null, false
7: this_PlugletInstance, HTTP_URL_FOR_GET, _top, null_streamListener, null, null, false
8: this_PlugletInstance, HTTP_URL_FOR_GET, EXISTING_TARGET_FOR_GET, null_streamListener, null, null, false
9: this_PlugletInstance, HTTP_URL_FOR_GET, NONEXISTING_TARGET_FOR_GET, null_streamListener, null, null, false

View File

@@ -1,26 +1,26 @@
<html>
<head>
This HTML used for getURL call of PlugletManager
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.checkResult_target(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletManager_getURL test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>
<html>
<head>
This HTML used for getURL call of PlugletManager
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.checkResult_target(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletManager_getURL test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>

View File

@@ -2,10 +2,10 @@ PlugletManager_getURL Information.
Test name: PlugletManager_getURL_1
Goals: This test case calls getURL method with different targets
and good another arguments.
See ParamCombinations and TestParameters for used targets.
Goals: This test case calls getURL method with different targets
and good another arguments.
See ParamCombinations and TestParameters for used targets.
Synopsis: getURL method of class PlugletManager
Pre-Conditions: Build mozilla, setup enviroment as for running mozilla

View File

@@ -1,3 +1,3 @@
NONEXISTING_TARGET_FOR_GET=nonexisting_target
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_URL_FOR_GET=use_default_html
NONEXISTING_TARGET_FOR_GET=nonexisting_target
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_URL_FOR_GET=use_default_html

View File

@@ -1,5 +1,5 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_128
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_Iterator
TEST_HTML=api/PlugletManager_getURL_1/PlugletManager_getURL.html
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_128
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_Iterator
TEST_HTML=api/PlugletManager_getURL_1/PlugletManager_getURL.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletManager_getURL_1
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_getURL_1
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -20,152 +20,152 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_getURL_128 implements Test
{
private static Pluglet plugletInstance = null;
private static URL url = null;
private static String target = null;
private static PlugletStreamListener listener = null;
private static String altHost = null;
private static URL referer = null;
private static Boolean JSEnabled = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_getURL_128()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_getURL_128");
System.err.println("ERROR:null context passed in execute(TestContext) of PlugletManager_getURL_128");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_getURL_128");
System.err.println("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_getURL_128");
return;
}
//Initialization of parameters
plugletInstance = (Pluglet)vectorOfParameters.elementAt(0);
url = (URL)vectorOfParameters.elementAt(1);
target = (String)vectorOfParameters.elementAt(2);
listener = (PlugletStreamListener)vectorOfParameters.elementAt(3);
altHost = (String)vectorOfParameters.elementAt(4);
referer = (URL)vectorOfParameters.elementAt(5);
JSEnabled = (Boolean)vectorOfParameters.elementAt(6);
//Call tested method
PlugletManager_obj.getURL(plugletInstance,url,target,listener,altHost,referer,JSEnabled.booleanValue());
TestContext.printLog("DEBUG: Void method PlugletManager_getURL(" +
plugletInstance + "," +
url + "," +
target + "," +
listener + "," +
altHost + "," +
referer + "," +
JSEnabled + ")");
}
public static void checkResult_target(String winName, boolean isTop)
{
if (target.equals("_top")&&isTop) {
TestContext.registerPASSED("All data was posted in _top window.");
return;
}
if (target.equals(winName)) {
TestContext.registerPASSED("All data was posted in right window with name: " + winName);
} else {
TestContext.registerFAILED("Data was posted to the wrong window with name: " + winName +
" instead of: " + target);
}
}
public static void checkResult_referer(String ref)
{
if (ref.equals(referer)) {
TestContext.registerPASSED("Right HTTP_REFERER passed to CGI script: " + ref);
} else {
TestContext.registerFAILED("Wrong HTTP_REFERER: \"" + ref +
"\" instead of: \"" + referer + "\"");
}
}
public static void setResult(boolean res,String comment)
{
if(res) {
TestContext.registerPASSED("Result from JavaScript: " + comment);
} else {
TestContext.registerFAILED("Result from JavaScript: " + comment);
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_getURL_128 implements Test
{
private static Pluglet plugletInstance = null;
private static URL url = null;
private static String target = null;
private static PlugletStreamListener listener = null;
private static String altHost = null;
private static URL referer = null;
private static Boolean JSEnabled = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_getURL_128()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_getURL_128");
System.err.println("ERROR:null context passed in execute(TestContext) of PlugletManager_getURL_128");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_getURL_128");
System.err.println("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_getURL_128");
return;
}
//Initialization of parameters
plugletInstance = (Pluglet)vectorOfParameters.elementAt(0);
url = (URL)vectorOfParameters.elementAt(1);
target = (String)vectorOfParameters.elementAt(2);
listener = (PlugletStreamListener)vectorOfParameters.elementAt(3);
altHost = (String)vectorOfParameters.elementAt(4);
referer = (URL)vectorOfParameters.elementAt(5);
JSEnabled = (Boolean)vectorOfParameters.elementAt(6);
//Call tested method
PlugletManager_obj.getURL(plugletInstance,url,target,listener,altHost,referer,JSEnabled.booleanValue());
TestContext.printLog("DEBUG: Void method PlugletManager_getURL(" +
plugletInstance + "," +
url + "," +
target + "," +
listener + "," +
altHost + "," +
referer + "," +
JSEnabled + ")");
}
public static void checkResult_target(String winName, boolean isTop)
{
if (target.equals("_top")&&isTop) {
TestContext.registerPASSED("All data was posted in _top window.");
return;
}
if (target.equals(winName)) {
TestContext.registerPASSED("All data was posted in right window with name: " + winName);
} else {
TestContext.registerFAILED("Data was posted to the wrong window with name: " + winName +
" instead of: " + target);
}
}
public static void checkResult_referer(String ref)
{
if (ref.equals(referer)) {
TestContext.registerPASSED("Right HTTP_REFERER passed to CGI script: " + ref);
} else {
TestContext.registerFAILED("Wrong HTTP_REFERER: \"" + ref +
"\" instead of: \"" + referer + "\"");
}
}
public static void setResult(boolean res,String comment)
{
if(res) {
TestContext.registerPASSED("Result from JavaScript: " + comment);
} else {
TestContext.registerFAILED("Result from JavaScript: " + comment);
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -1,7 +1,7 @@
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0, FTP_URL_FOR_GET'0, MAILTO_URL_FOR_GET'0, FILE_URL_FOR_GET'0, FILE_WIN_URL_FOR_GET'0, JAVASCRIPT_URL_FOR_GET'0
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'0
null'0
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0, FTP_URL_FOR_GET'0, MAILTO_URL_FOR_GET'0, FILE_URL_FOR_GET'0, FILE_WIN_URL_FOR_GET'0, JAVASCRIPT_URL_FOR_GET'0
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'0
null'0
false'0

View File

@@ -1,24 +1,24 @@
<html>
<head>
This HTML used for getURL call of PlugletManager
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
//Note that we verify only loading of document,
if document was loaded succesfully via protocol http, ftp, file then JavaScript says: "All OK"
Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.setResult(true,'Document was succesfully loaded');
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletManager_getURL test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>
<html>
<head>
This HTML used for getURL call of PlugletManager
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
//Note that we verify only loading of document,
if document was loaded succesfully via protocol http, ftp, file then JavaScript says: "All OK"
Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.setResult(true,'Document was succesfully loaded');
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletManager_getURL test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>

View File

@@ -4,9 +4,9 @@ Test name: PlugletManager_getURL
Synopsis: getURL method of class PlugletManager
Goals: this test case test possible URL types.
<ftp_root_dir>, <html_root> and <html_root_dir> should be specified.
Goals: this test case test possible URL types.
<ftp_root_dir>, <html_root> and <html_root_dir> should be specified.
Pre-Conditions: Build mozilla, setup enviroment as for running mozilla
and see api tests README for setup enviroment for run tests.

View File

@@ -1,7 +1,7 @@
EXISTING_TARGET_FOR_GET=exist_target_for_get
FILE_WIN_URL_FOR_GET=file:///<html_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
MAILTO_URL_FOR_GET=mailto:avm@sparc.spb.su
HTTP_URL_FOR_GET=http://<html_root>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
FILE_URL_FOR_GET=file:///<html_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
FTP_URL_FOR_GET=ftp://anonymous@localhost/<ftp_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
JAVASCRIPT_URL_FOR_GET=javascript:Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.setResult(true,'JAVASCRIPT_URL_WORKS');
EXISTING_TARGET_FOR_GET=exist_target_for_get
FILE_WIN_URL_FOR_GET=file:///<html_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
MAILTO_URL_FOR_GET=mailto:avm@sparc.spb.su
HTTP_URL_FOR_GET=http://<html_root>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
FILE_URL_FOR_GET=file:///<html_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
FTP_URL_FOR_GET=ftp://anonymous@localhost/<ftp_root_dir>/api/PlugletManager_getURL_2/PlugletManager_getURL_default_getData.html
JAVASCRIPT_URL_FOR_GET=javascript:Packages.org.mozilla.pluglet.test.basic.api.PlugletManaget_getURL_128.setResult(true,'JAVASCRIPT_URL_WORKS');

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletManager_getURL_2
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_getURL_2
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -1,7 +1,7 @@
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'0
null'0, CURRENT_REFERER_URL'0, HTTP_OTHER_REFERER_URL'0
this_PlugletInstance'0
null'1, HTTP_URL_FOR_GET'0
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'0
null'0, CURRENT_REFERER_URL'0, HTTP_OTHER_REFERER_URL'0
true'0

View File

@@ -1,4 +1,4 @@
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_OTHER_REFERER_URL=http://www.mozilla.org/index.html
CURRENT_REFERER_URL=<html_root>/api/PlugletManager_getURL_3/PlugletManager_getURL.html
HTTP_URL_FOR_GET=<cgi_root>/api/PlugletManager_getURL_3/verify_referer.cgi
EXISTING_TARGET_FOR_GET=exist_target_for_get
HTTP_OTHER_REFERER_URL=http://www.mozilla.org/index.html
CURRENT_REFERER_URL=<html_root>/api/PlugletManager_getURL_3/PlugletManager_getURL.html
HTTP_URL_FOR_GET=<cgi_root>/api/PlugletManager_getURL_3/verify_referer.cgi

View File

@@ -20,28 +20,28 @@
# Contributor(s):
TEST_NAME=PlugletManager_getURL_3
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_getURL_3
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -1,11 +1,11 @@
#!/usr/local/bin/perl
$referer = $ENV{HTTP_REFERER};
print "Content-Type: text/html\n\n";
print "<html><head><script Language=\"JavaScript\">\n<!--\n";
print "function registerResults() \n{\n";
print "Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_128.checkResult_referer(\"$referer\")\;\n";
print "}\n";
print "//-->\n";
print "</script></head><body onLoad=\"registerResults()\">\n";
print "This script make verification of HTTP_REFERER variable and tranfer it to pluglet\n";
print "</body></html>";
#!/usr/local/bin/perl
$referer = $ENV{HTTP_REFERER};
print "Content-Type: text/html\n\n";
print "<html><head><script Language=\"JavaScript\">\n<!--\n";
print "function registerResults() \n{\n";
print "Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_getURL_128.checkResult_referer(\"$referer\")\;\n";
print "}\n";
print "//-->\n";
print "</script></head><body onLoad=\"registerResults()\">\n";
print "This script make verification of HTTP_REFERER variable and tranfer it to pluglet\n";
print "</body></html>";

View File

@@ -1,7 +1,7 @@
this_PlugletInstance'0
GOOD_HTTP_URL_FOR_GET'0, BAD_HOST_HTTP_URL_FOR_GET'1
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'1, GOOD_ALT_HOST'0, BAD_ALT_HOST'1, OTHER_GOOD_ALT_HOST'0
null'0
this_PlugletInstance'0
GOOD_HTTP_URL_FOR_GET'0, BAD_HOST_HTTP_URL_FOR_GET'1
EXISTING_TARGET_FOR_GET'0
null_streamListener'0
null'1, GOOD_ALT_HOST'0, BAD_ALT_HOST'1, OTHER_GOOD_ALT_HOST'0
null'0
true'0

View File

@@ -1,6 +1,6 @@
EXISTING_TARGET_FOR_GET=exist_target_for_get
GOOD_HTTP_URL_FOR_GET=<cgi_root>/good_host.cgi
BAD_HOST_HTTP_URL_FOR_GET=<cgi_root_bad_host>/bad_host.cgi
BAD_ALT_HOST=111.111.222.222
GOOD_ALT_HOST=192.168.205.165
EXISTING_TARGET_FOR_GET=exist_target_for_get
GOOD_HTTP_URL_FOR_GET=<cgi_root>/good_host.cgi
BAD_HOST_HTTP_URL_FOR_GET=<cgi_root_bad_host>/bad_host.cgi
BAD_ALT_HOST=111.111.222.222
GOOD_ALT_HOST=192.168.205.165
OTHER_GOOD_ALT_HOST=192.168.205.182

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletManager_getURL_4
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_getURL_4
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -20,221 +20,221 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_getURL_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_getURL_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_getURL_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_getURL_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[7];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
//Please hack this block.
// Parameter number 0,parameter type is Pluglet
//result = (Object)(paramValue[0].equals("null") ? null : context.getPluglet());
if (paramValue[0].equals("null_Pluglet"))
{
result = (Object)(null);
} else if (paramValue[0].equals("this_Pluglet"))
{
result = (Object)(context.getPluglet());
} else if (paramValue[0].equals("other_Pluglet"))
{
result = (Object)(context.getOtherPluglet());
} else
{
System.err.println("PlugletManager_getURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
}
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is URL
try {
if (paramValue[1].equals("null"))
{
result = (Object)(null);
} else if (paramValue[1].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[1]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" String value ");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" .Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 2,parameter type is String
result = (Object)(paramValue[2].equals("null") ? null : paramValue[2] );
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 3,parameter type is PlugletStreamListener
//result = (Object)(paramValue[3].equals("null") ? null : context.getPlugletStreamListener());
if (paramValue[3].equals("null_streamListener"))
{
result = (Object)(null);
} else if (paramValue[3].equals("current_streamListener")||paramValue[3].equals("NOTNULL"))
{
result = (Object)(context.getPlugletStreamListener());
} else if (paramValue[3].equals("new_streamListener"))
{
PlugletStreamListener newPlugletStreamListener = new TestStreamListener(context);
//context.addNewPlugletStreamListener(newPlugletStreamListener);
result = (Object)(newPlugletStreamListener);
System.err.println("WARNING: Currently test doesn't know how work with newPlugletStreamListener\n");
//TestContext.registerFAILED("Currently test doesn't know how work with newPlugletStreamListener\n");
} else
{
System.err.println("PlugletManager_getURL_Iterator can't parse \"" + paramValue[3] + "\" value for PlugletStreamListener\n");
TestContext.registerFAILED("PlugletManager_getURL_Iterator can't parse \"" + paramValue[3] + "\" value for PlugletStreamListener\n");
}
vectorOfParameters.addElement(result);
// Parameter number 4,parameter type is String
result = (Object)(paramValue[4].equals("null") ? null : paramValue[4] );
vectorOfParameters.addElement(result);
// Parameter number 5,parameter type is URL
try {
if (paramValue[5].equals("null"))
{
result = (Object)(null);
} else if (paramValue[5].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[5]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[5] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[5] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 6,parameter type is boolean
result = (Object)(new Boolean(paramValue[6]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[7];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
//Please hack this block.
// Parameter number 0,parameter type is Pluglet
//result = (Object)(paramValue[0].equals("null") ? null : context.getPluglet());
if (paramValue[0].equals("null_Pluglet"))
{
result = (Object)(null);
} else if (paramValue[0].equals("this_Pluglet"))
{
result = (Object)(context.getPluglet());
} else if (paramValue[0].equals("other_Pluglet"))
{
result = (Object)(context.getOtherPluglet());
} else
{
System.err.println("PlugletManager_getURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
}
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is URL
try {
if (paramValue[1].equals("null"))
{
result = (Object)(null);
} else if (paramValue[1].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[1]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" String value ");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" .Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 2,parameter type is String
result = (Object)(paramValue[2].equals("null") ? null : paramValue[2] );
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 3,parameter type is PlugletStreamListener
//result = (Object)(paramValue[3].equals("null") ? null : context.getPlugletStreamListener());
if (paramValue[3].equals("null_streamListener"))
{
result = (Object)(null);
} else if (paramValue[3].equals("current_streamListener")||paramValue[3].equals("NOTNULL"))
{
result = (Object)(context.getPlugletStreamListener());
} else if (paramValue[3].equals("new_streamListener"))
{
PlugletStreamListener newPlugletStreamListener = new TestStreamListener(context);
//context.addNewPlugletStreamListener(newPlugletStreamListener);
result = (Object)(newPlugletStreamListener);
System.err.println("WARNING: Currently test doesn't know how work with newPlugletStreamListener\n");
//TestContext.registerFAILED("Currently test doesn't know how work with newPlugletStreamListener\n");
} else
{
System.err.println("PlugletManager_getURL_Iterator can't parse \"" + paramValue[3] + "\" value for PlugletStreamListener\n");
TestContext.registerFAILED("PlugletManager_getURL_Iterator can't parse \"" + paramValue[3] + "\" value for PlugletStreamListener\n");
}
vectorOfParameters.addElement(result);
// Parameter number 4,parameter type is String
result = (Object)(paramValue[4].equals("null") ? null : paramValue[4] );
vectorOfParameters.addElement(result);
// Parameter number 5,parameter type is URL
try {
if (paramValue[5].equals("null"))
{
result = (Object)(null);
} else if (paramValue[5].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[5]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[5] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[5] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 6,parameter type is boolean
result = (Object)(new Boolean(paramValue[6]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}

View File

@@ -1,11 +1,11 @@
null'1, this_Pluglet'0, other_Pluglet'0
null'1, HTTP_TARGET_URL_FOR_POST'0, FTP_TARGET_URL_FOR_POST'1, MAILTO_TARGET_URL_FOR_POST'0, FILE_TARGET_URL_FOR_POST'1
DATA_LEN_FOR_POST'0, LESS_THEN_DATA_LEN_FOR_POST'1, MORE_THEN_DATA_LEN_FOR_POST'1
null'0, FILE_NAME_WITH_CORRECT_FULL_BUF'0, FILE_NAME_WITH_CORRECT_NOT_FULL_BUF'1, FILE_NAME_WITH_EXISTING_FULL_PATH_FOR_POST'0, FILE_NAME_WITH_NONEXISTING_FULL_PATH_FOR_POST'1, FILE_NAME_WITH_INCORRECT_PATH'1
true'0, false'0
null'0, _self'0, _parent'1, EXISTING_TARGET_FOR_POST'0, NONEXISTING_TARGET_FOR_POST'1
null'1, current_streamListener'0, new_streamListener'1
null'1, CURRENT_ALT_HOST'0, OTHER_ALT_HOST'1, INCORRECT_ALT_HOST'1
null'0, CURRENT_REFERER_URL'1, HTTP_OTHER_REFERER_URL'1
true'1, false'0
HEADER_BUF_LENGTH'0, MORE_THEN_HEADER_BUF_LENGTH'1, LESS_THEN_HEADER_BUF_LENGTH'1
null'1, this_Pluglet'0, other_Pluglet'0
null'1, HTTP_TARGET_URL_FOR_POST'0, FTP_TARGET_URL_FOR_POST'1, MAILTO_TARGET_URL_FOR_POST'0, FILE_TARGET_URL_FOR_POST'1
DATA_LEN_FOR_POST'0, LESS_THEN_DATA_LEN_FOR_POST'1, MORE_THEN_DATA_LEN_FOR_POST'1
null'0, FILE_NAME_WITH_CORRECT_FULL_BUF'0, FILE_NAME_WITH_CORRECT_NOT_FULL_BUF'1, FILE_NAME_WITH_EXISTING_FULL_PATH_FOR_POST'0, FILE_NAME_WITH_NONEXISTING_FULL_PATH_FOR_POST'1, FILE_NAME_WITH_INCORRECT_PATH'1
true'0, false'0
null'0, _self'0, _parent'1, EXISTING_TARGET_FOR_POST'0, NONEXISTING_TARGET_FOR_POST'1
null'1, current_streamListener'0, new_streamListener'1
null'1, CURRENT_ALT_HOST'0, OTHER_ALT_HOST'1, INCORRECT_ALT_HOST'1
null'0, CURRENT_REFERER_URL'1, HTTP_OTHER_REFERER_URL'1
true'1, false'0
HEADER_BUF_LENGTH'0, MORE_THEN_HEADER_BUF_LENGTH'1, LESS_THEN_HEADER_BUF_LENGTH'1

View File

@@ -1,6 +1,6 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_9216
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_Iterator
TEST_HTML=api/PlugletManager_postURL/PlugletManager_postURL.html
LST_FILE_NAME=PlugletManager_postURL.lst.TEMP
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_9216
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_postURL_Iterator
TEST_HTML=api/PlugletManager_postURL/PlugletManager_postURL.html
LST_FILE_NAME=PlugletManager_postURL.lst.TEMP
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletManager_postURL
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_postURL
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -20,107 +20,107 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_postURL_9216 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_postURL_9216 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_postURL_9216()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_postURL_9216()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_postURL_9216");
System.err.println("ERROR:null context passed in execute(TestContext) of PlugletManager_postURL_9216");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_postURL_9216");
System.err.println("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_postURL_9216");
return;
}
PlugletManager_obj.postURL((Pluglet)vectorOfParameters.elementAt(0),(URL)vectorOfParameters.elementAt(1),((Integer)vectorOfParameters.elementAt(2)).intValue(),(byte[])vectorOfParameters.elementAt(3),((Boolean)vectorOfParameters.elementAt(4)).booleanValue(),(String)vectorOfParameters.elementAt(5),(PlugletStreamListener)vectorOfParameters.elementAt(6),(String)vectorOfParameters.elementAt(7),(URL)vectorOfParameters.elementAt(8),((Boolean)vectorOfParameters.elementAt(9)).booleanValue(),((Integer)vectorOfParameters.elementAt(10)).intValue(),(byte[])vectorOfParameters.elementAt(11));
System.err.println("DEBUG: Void method PlugletManager_postURL(" + "," +
(Pluglet)vectorOfParameters.elementAt(0) + "," +
(URL)vectorOfParameters.elementAt(1) + "," +
((Integer)vectorOfParameters.elementAt(2)).intValue() + "," +
(byte[])vectorOfParameters.elementAt(3) + "," +
((Boolean)vectorOfParameters.elementAt(4)).booleanValue() + "," +
(String)vectorOfParameters.elementAt(5) + "," +
(PlugletStreamListener)vectorOfParameters.elementAt(6) + "," +
(String)vectorOfParameters.elementAt(7) + "," +
(URL)vectorOfParameters.elementAt(8) + "," +
((Boolean)vectorOfParameters.elementAt(9)).booleanValue() + "," +
((Integer)vectorOfParameters.elementAt(10)).intValue() + "," +
(byte[])vectorOfParameters.elementAt(11) + ")");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_postURL_9216");
System.err.println("ERROR:null context passed in execute(TestContext) of PlugletManager_postURL_9216");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_postURL_9216");
System.err.println("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_postURL_9216");
return;
}
PlugletManager_obj.postURL((Pluglet)vectorOfParameters.elementAt(0),(URL)vectorOfParameters.elementAt(1),((Integer)vectorOfParameters.elementAt(2)).intValue(),(byte[])vectorOfParameters.elementAt(3),((Boolean)vectorOfParameters.elementAt(4)).booleanValue(),(String)vectorOfParameters.elementAt(5),(PlugletStreamListener)vectorOfParameters.elementAt(6),(String)vectorOfParameters.elementAt(7),(URL)vectorOfParameters.elementAt(8),((Boolean)vectorOfParameters.elementAt(9)).booleanValue(),((Integer)vectorOfParameters.elementAt(10)).intValue(),(byte[])vectorOfParameters.elementAt(11));
System.err.println("DEBUG: Void method PlugletManager_postURL(" + "," +
(Pluglet)vectorOfParameters.elementAt(0) + "," +
(URL)vectorOfParameters.elementAt(1) + "," +
((Integer)vectorOfParameters.elementAt(2)).intValue() + "," +
(byte[])vectorOfParameters.elementAt(3) + "," +
((Boolean)vectorOfParameters.elementAt(4)).booleanValue() + "," +
(String)vectorOfParameters.elementAt(5) + "," +
(PlugletStreamListener)vectorOfParameters.elementAt(6) + "," +
(String)vectorOfParameters.elementAt(7) + "," +
(URL)vectorOfParameters.elementAt(8) + "," +
((Boolean)vectorOfParameters.elementAt(9)).booleanValue() + "," +
((Integer)vectorOfParameters.elementAt(10)).intValue() + "," +
(byte[])vectorOfParameters.elementAt(11) + ")");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -20,313 +20,313 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_postURL_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_postURL_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_postURL_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_postURL_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[12];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
//Please hack this block.
// Parameter number 0,parameter type is Pluglet
//result = (Object)(paramValue[0].equals("null") ? null : context.getPluglet());
if (paramValue[0].equals("null"))
{
result = (Object)(null);
} else if (paramValue[0].equals("this_Pluglet"))
{
result = (Object)(context.getPluglet());
} else if (paramValue[0].equals("other_Pluglet"))
{
result = (Object)(context.getOtherPluglet());
} else
{
System.err.println("PlugletManager_postURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
TestContext.registerFAILED("PlugletManager_postURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
}
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is URL
try {
if (paramValue[1].equals("null"))
{
result = (Object)(null);
} else if (paramValue[1].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[1]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 2,parameter type is int
try {
if (paramValue[2].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[2].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[2].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[2]));
}
}catch(NumberFormatException e)
{
System.err.println("NumberFormatException thrown when compiling Integer value. Wrong parameter");
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
}
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 3,parameter type is Arr1byte
result = (Object)(paramValue[3].equals("null") ? null : readByteArray(paramValue[3]));
vectorOfParameters.addElement(result);
// Parameter number 4,parameter type is boolean
result = (Object)(new Boolean(paramValue[4]));
vectorOfParameters.addElement(result);
// Parameter number 5,parameter type is String
result = (Object)(paramValue[5].equals("null") ? null : paramValue[5] );
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 6,parameter type is PlugletStreamListener
//result = (Object)(paramValue[6].equals("null") ? null : context.getPlugletStreamListener());
if (paramValue[6].equals("null"))
{
result = (Object)(null);
} else if (paramValue[6].equals("current_streamListener")||paramValue[3].equals("NOTNULL"))
{
result = (Object)(context.getPlugletStreamListener());
} else if (paramValue[6].equals("new_streamListener"))
{
PlugletStreamListener newPlugletStreamListener = new TestStreamListener(context);
//context.addNewPlugletStreamListener(newPlugletStreamListener);
System.err.println("WARNING:Currently test doesn't know how work with newPlugletStreamListener\n");
// TestContext.registerFAILED("Currently test doesn't know how work with newPlugletStreamListener\n");
result = (Object)(newPlugletStreamListener);
} else
{
System.err.println("PlugletManager_postURL_Iterator can't parse \"" + paramValue[6] + "\" value for PlugletStreamListener\n");
TestContext.registerFAILED("PlugletManager_postURL_Iterator can't parse \"" + paramValue[6] + "\" value for PlugletStreamListener\n");
}
vectorOfParameters.addElement(result);
// Parameter number 7,parameter type is String
result = (Object)(paramValue[7].equals("null") ? null : paramValue[7] );
vectorOfParameters.addElement(result);
// Parameter number 8,parameter type is URL
try {
if (paramValue[8].equals("null"))
{
result = (Object)(null);
} else if (paramValue[8].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[8]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[8] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[8] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 9,parameter type is boolean
result = (Object)(new Boolean(paramValue[9]));
vectorOfParameters.addElement(result);
// Parameter number 10,parameter type is int
try {
if (paramValue[10].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[10].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[10].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[10]));
}
}catch(NumberFormatException e)
{
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
return false;
}
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 11,parameter type is Arr1byte
result = (Object)(paramValue[11].equals("null") ? null : readByteArray(paramValue[11]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
private byte[] readByteArray(String fileName)
{
FileInputStream fis = null;
byte cur;
String separator = System.getProperty("file.separator");
String fullName = context.getTestDir() + separator + fileName;
Vector arrVect = new Vector();
try {
fis = new FileInputStream(fullName);
} catch (Exception e) {
TestContext.registerFAILED("Can't open file with Byte Array: " + fullName);
return null;
}
try{
while((cur = (byte)fis.read())!=-1)
{
arrVect.addElement((Object)(new Byte(cur)));
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from file with Byte Array: " + fullName);
return null;
}
try {
fis.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close file with Byte Array: " + fullName);
return null;
}
byte[] byteArr = new byte[arrVect.size()];
for(int i=0;i<arrVect.size();i++)
{
byteArr[i] = ((Byte)arrVect.elementAt(i)).byteValue();
}
return byteArr;
}
}
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[12];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
//Please hack this block.
// Parameter number 0,parameter type is Pluglet
//result = (Object)(paramValue[0].equals("null") ? null : context.getPluglet());
if (paramValue[0].equals("null"))
{
result = (Object)(null);
} else if (paramValue[0].equals("this_Pluglet"))
{
result = (Object)(context.getPluglet());
} else if (paramValue[0].equals("other_Pluglet"))
{
result = (Object)(context.getOtherPluglet());
} else
{
System.err.println("PlugletManager_postURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
TestContext.registerFAILED("PlugletManager_postURL_Iterator can't parse value \"" + paramValue[0] + "\" for Pluglet\n");
}
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is URL
try {
if (paramValue[1].equals("null"))
{
result = (Object)(null);
} else if (paramValue[1].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[1]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[1] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 2,parameter type is int
try {
if (paramValue[2].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[2].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[2].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[2]));
}
}catch(NumberFormatException e)
{
System.err.println("NumberFormatException thrown when compiling Integer value. Wrong parameter");
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
}
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 3,parameter type is Arr1byte
result = (Object)(paramValue[3].equals("null") ? null : readByteArray(paramValue[3]));
vectorOfParameters.addElement(result);
// Parameter number 4,parameter type is boolean
result = (Object)(new Boolean(paramValue[4]));
vectorOfParameters.addElement(result);
// Parameter number 5,parameter type is String
result = (Object)(paramValue[5].equals("null") ? null : paramValue[5] );
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 6,parameter type is PlugletStreamListener
//result = (Object)(paramValue[6].equals("null") ? null : context.getPlugletStreamListener());
if (paramValue[6].equals("null"))
{
result = (Object)(null);
} else if (paramValue[6].equals("current_streamListener")||paramValue[3].equals("NOTNULL"))
{
result = (Object)(context.getPlugletStreamListener());
} else if (paramValue[6].equals("new_streamListener"))
{
PlugletStreamListener newPlugletStreamListener = new TestStreamListener(context);
//context.addNewPlugletStreamListener(newPlugletStreamListener);
System.err.println("WARNING:Currently test doesn't know how work with newPlugletStreamListener\n");
// TestContext.registerFAILED("Currently test doesn't know how work with newPlugletStreamListener\n");
result = (Object)(newPlugletStreamListener);
} else
{
System.err.println("PlugletManager_postURL_Iterator can't parse \"" + paramValue[6] + "\" value for PlugletStreamListener\n");
TestContext.registerFAILED("PlugletManager_postURL_Iterator can't parse \"" + paramValue[6] + "\" value for PlugletStreamListener\n");
}
vectorOfParameters.addElement(result);
// Parameter number 7,parameter type is String
result = (Object)(paramValue[7].equals("null") ? null : paramValue[7] );
vectorOfParameters.addElement(result);
// Parameter number 8,parameter type is URL
try {
if (paramValue[8].equals("null"))
{
result = (Object)(null);
} else if (paramValue[8].equals("NOTNULL"))
{
System.err.println("Value NOTNULL not used NOW.Please change parameters file.\n");
TestContext.registerFAILED("Value NOTNULL not used NOW.Please change parameters file.\n");
//result = (Object)(new URL("http://www.mozilla.org"));
} else
{
result = (Object)(new URL(paramValue[8]));
}
}catch(MalformedURLException e)
{
System.err.println("MalformedURLException thrown when compiling URL from \"" + paramValue[8] + "\" value");
TestContext.registerFAILED("MalformedURLException thrown when compiling URL from \"" + paramValue[8] + "\".Wrong parameters file? ");
}
vectorOfParameters.addElement(result);
// Parameter number 9,parameter type is boolean
result = (Object)(new Boolean(paramValue[9]));
vectorOfParameters.addElement(result);
// Parameter number 10,parameter type is int
try {
if (paramValue[10].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[10].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[10].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[10]));
}
}catch(NumberFormatException e)
{
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
return false;
}
vectorOfParameters.addElement(result);
//Please hack this block.
// Parameter number 11,parameter type is Arr1byte
result = (Object)(paramValue[11].equals("null") ? null : readByteArray(paramValue[11]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
private byte[] readByteArray(String fileName)
{
FileInputStream fis = null;
byte cur;
String separator = System.getProperty("file.separator");
String fullName = context.getTestDir() + separator + fileName;
Vector arrVect = new Vector();
try {
fis = new FileInputStream(fullName);
} catch (Exception e) {
TestContext.registerFAILED("Can't open file with Byte Array: " + fullName);
return null;
}
try{
while((cur = (byte)fis.read())!=-1)
{
arrVect.addElement((Object)(new Byte(cur)));
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from file with Byte Array: " + fullName);
return null;
}
try {
fis.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close file with Byte Array: " + fullName);
return null;
}
byte[] byteArr = new byte[arrVect.size()];
for(int i=0;i<arrVect.size();i++)
{
byteArr[i] = ((Byte)arrVect.elementAt(i)).byteValue();
}
return byteArr;
}
}

View File

@@ -1,8 +1,8 @@
<html>
<body>
<applet code=DelApp.class width=1 height=1>
<PARAM name=PROPS_FILE_NAME value=TestProperties>
<PARAM name=NEXT_HTML value=PlugletManager_reloadPluglets.html>
</applet>
</body>
<html>
<body>
<applet code=DelApp.class width=1 height=1>
<PARAM name=PROPS_FILE_NAME value=TestProperties>
<PARAM name=NEXT_HTML value=PlugletManager_reloadPluglets.html>
</applet>
</body>
</html>

View File

@@ -1,9 +1,9 @@
<html>
<frameset rows=100,*>
<frame src=PlugletManager_reloadPluglets_head.html>
<frameset cols=*,*>
<frame src=DelApp.html>
<frame src=PlugletManager_reloadPluglets_empty.html name=pluglet_frame>
</frameset>
</frameset>
</hmtl>
<html>
<frameset rows=100,*>
<frame src=PlugletManager_reloadPluglets_head.html>
<frameset cols=*,*>
<frame src=DelApp.html>
<frame src=PlugletManager_reloadPluglets_empty.html name=pluglet_frame>
</frameset>
</frameset>
</hmtl>

View File

@@ -1,7 +1,7 @@
<html>
<body>
<blockquote>
This page is empty, pluglet should be loaded here.
</blockquote>
</body>
</hmtl>
<html>
<body>
<blockquote>
This page is empty, pluglet should be loaded here.
</blockquote>
</body>
</hmtl>

View File

@@ -1,10 +1,10 @@
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This widow contains a frameset with empty frame and DelApp applet.
Aftre removing second jar file test pluglet will be loaded to empty window.
</blockquote>
<BR>
<B>PS.</B>We should use this scheme!(Mozilla's JVM bug now causes JVM to suspend in some cases)
</body>
</hmtl>
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This widow contains a frameset with empty frame and DelApp applet.
Aftre removing second jar file test pluglet will be loaded to empty window.
</blockquote>
<BR>
<B>PS.</B>We should use this scheme!(Mozilla's JVM bug now causes JVM to suspend in some cases)
</body>
</hmtl>

View File

@@ -1,23 +1,23 @@
<html>
<head>
<script language="JavaScript">
<!--
function doSecondPluglet(changeTo)
{
var currentLocation = new String(window.location);
var newLocation = "";
var fieldArr = currentLocation.split("/");
for (var j=0; j< fieldArr.length - 1 ;j++) {
newLocation += fieldArr[j] + "/";
}
window.location=newLocation + changeTo
}
//-->
</script>
</head>
<body onLoad=window.setTimeout("doSecondPluglet('SecondPluglet.html')",5000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletManager_reloadPluglets test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>
<html>
<head>
<script language="JavaScript">
<!--
function doSecondPluglet(changeTo)
{
var currentLocation = new String(window.location);
var newLocation = "";
var fieldArr = currentLocation.split("/");
for (var j=0; j< fieldArr.length - 1 ;j++) {
newLocation += fieldArr[j] + "/";
}
window.location=newLocation + changeTo
}
//-->
</script>
</head>
<body onLoad=window.setTimeout("doSecondPluglet('SecondPluglet.html')",5000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletManager_reloadPluglets test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>

View File

@@ -1,9 +1,9 @@
<html>
<head>
</head>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with type application/x-second-pluglet test.</blockquote>
<EMBED type="application/x-second-pluglet" name="test" width=100 height=100>
</body>
</hmtl>
<html>
<head>
</head>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with type application/x-second-pluglet test.</blockquote>
<EMBED type="application/x-second-pluglet" name="test" width=100 height=100>
</body>
</hmtl>

View File

@@ -1,152 +1,152 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
*/
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.io.*;
import java.awt.print.*;
import java.awt.Frame;
import org.mozilla.pluglet.test.basic.TestContext;
import org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2;
public class SecondPluglet implements PlugletFactory {
public SecondPluglet() {
}
/**
* Creates a new pluglet instance, based on a MIME type. This
* allows different impelementations to be created depending on
* the specified MIME type.
*/
public Pluglet createPluglet(String mimeType) {
return new TestInstance();
}
/**
* Initializes the pluglet and will be called before any new instances are
* created.
*/
public void initialize(PlugletManager manager) {
}
/**
* Called when the browser is done with the pluglet factory, or when
* the pluglet is disabled by the user.
*/
public void shutdown() {
}
}
class TestInstance implements Pluglet {
PlugletPeer peer;
public TestInstance() {
TestContext.registerPASSED("Second pluglet loaded");
}
/**
* Initializes a newly created pluglet instance, passing to it the pluglet
* instance peer which it should use for all communication back to the browser.
*
* @param peer the corresponding pluglet instance peer
*/
public void initialize(PlugletPeer peer) {
this.peer = peer;
}
/**
* Called to instruct the pluglet instance to start. This will be called after
* the pluglet is first created and initialized, and may be called after the
* pluglet is stopped (via the Stop method) if the pluglet instance is returned
* to in the browser window's history.
*/
public void start() {
}
/**
* Called to instruct the pluglet instance to stop, thereby suspending its state.
* This method will be called whenever the browser window goes on to display
* another page and the page containing the pluglet goes into the window's history
* list.
*/
public void stop() {
}
/**
* Called to instruct the pluglet instance to destroy itself. This is called when
* it become no longer possible to return to the pluglet instance, either because
* the browser window's history list of pages is being trimmed, or because the
* window containing this page in the history is being closed.
*/
public void destroy() {
}
/**
* Called to tell the pluglet that the initial src/data stream is
* ready.
*
* @result PlugletStreamListener
*/
public PlugletStreamListener newStream() {
return new TestStreamListener();
}
/**
* Called when the window containing the pluglet instance changes.
*
* @param frame the pluglet panel
*/
public void setWindow(Frame frame) {
}
/**
* Called to instruct the pluglet instance to print itself to a printer.
*
* @param print printer information.
*/
public void print(PrinterJob printerJob) {
}
}
class TestStreamListener implements PlugletStreamListener {
public TestStreamListener() {
}
/**
* Notify the observer that the URL has started to load. This method is
* called only once, at the beginning of a URL load.<BR><BR>
*/
public void onStartBinding(PlugletStreamInfo streamInfo) {
}
/**
* Notify the client that data is available in the input stream. This
* method is called whenver data is written into the input stream by the
* networking library...<BR><BR>
*
* @param input The input stream containing the data. This stream can
* be either a blocking or non-blocking stream.
* @param length The amount of data that was just pushed into the stream.
*/
public void onDataAvailable(PlugletStreamInfo plugletInfo, InputStream input,int length) {
}
public void onFileAvailable(PlugletStreamInfo plugletInfo, String fileName) {
}
/**
* Notify the observer that the URL has finished loading.
*/
public void onStopBinding(PlugletStreamInfo plugletInfo,int status) {
}
public int getStreamType() {
return 1; //:)
}
}
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
*/
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.io.*;
import java.awt.print.*;
import java.awt.Frame;
import org.mozilla.pluglet.test.basic.TestContext;
import org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2;
public class SecondPluglet implements PlugletFactory {
public SecondPluglet() {
}
/**
* Creates a new pluglet instance, based on a MIME type. This
* allows different impelementations to be created depending on
* the specified MIME type.
*/
public Pluglet createPluglet(String mimeType) {
return new TestInstance();
}
/**
* Initializes the pluglet and will be called before any new instances are
* created.
*/
public void initialize(PlugletManager manager) {
}
/**
* Called when the browser is done with the pluglet factory, or when
* the pluglet is disabled by the user.
*/
public void shutdown() {
}
}
class TestInstance implements Pluglet {
PlugletPeer peer;
public TestInstance() {
TestContext.registerPASSED("Second pluglet loaded");
}
/**
* Initializes a newly created pluglet instance, passing to it the pluglet
* instance peer which it should use for all communication back to the browser.
*
* @param peer the corresponding pluglet instance peer
*/
public void initialize(PlugletPeer peer) {
this.peer = peer;
}
/**
* Called to instruct the pluglet instance to start. This will be called after
* the pluglet is first created and initialized, and may be called after the
* pluglet is stopped (via the Stop method) if the pluglet instance is returned
* to in the browser window's history.
*/
public void start() {
}
/**
* Called to instruct the pluglet instance to stop, thereby suspending its state.
* This method will be called whenever the browser window goes on to display
* another page and the page containing the pluglet goes into the window's history
* list.
*/
public void stop() {
}
/**
* Called to instruct the pluglet instance to destroy itself. This is called when
* it become no longer possible to return to the pluglet instance, either because
* the browser window's history list of pages is being trimmed, or because the
* window containing this page in the history is being closed.
*/
public void destroy() {
}
/**
* Called to tell the pluglet that the initial src/data stream is
* ready.
*
* @result PlugletStreamListener
*/
public PlugletStreamListener newStream() {
return new TestStreamListener();
}
/**
* Called when the window containing the pluglet instance changes.
*
* @param frame the pluglet panel
*/
public void setWindow(Frame frame) {
}
/**
* Called to instruct the pluglet instance to print itself to a printer.
*
* @param print printer information.
*/
public void print(PrinterJob printerJob) {
}
}
class TestStreamListener implements PlugletStreamListener {
public TestStreamListener() {
}
/**
* Notify the observer that the URL has started to load. This method is
* called only once, at the beginning of a URL load.<BR><BR>
*/
public void onStartBinding(PlugletStreamInfo streamInfo) {
}
/**
* Notify the client that data is available in the input stream. This
* method is called whenver data is written into the input stream by the
* networking library...<BR><BR>
*
* @param input The input stream containing the data. This stream can
* be either a blocking or non-blocking stream.
* @param length The amount of data that was just pushed into the stream.
*/
public void onDataAvailable(PlugletStreamInfo plugletInfo, InputStream input,int length) {
}
public void onFileAvailable(PlugletStreamInfo plugletInfo, String fileName) {
}
/**
* Notify the observer that the URL has finished loading.
*/
public void onStopBinding(PlugletStreamInfo plugletInfo,int status) {
}
public int getStreamType() {
return 1; //:)
}
}

View File

@@ -1,2 +1,2 @@
MIMEDescription: application/x-second-pluglet::Second Pluglet
Pluglet-Class: SecondPluglet
MIMEDescription: application/x-second-pluglet::Second Pluglet
Pluglet-Class: SecondPluglet

View File

@@ -1,9 +1,9 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_Iterator
TEST_HTML=api/PlugletManager_reloadPluglets/PlugletManager_reloadPluglets.html
PLUGLET_DIR=c:\\home\\avm\\pl_test\\build\\classes\\org\\mozilla\\pluglet\\test\\basic
TEST_DIR=c:\\home\\avm\\pl_test\\build\\test\\basic\\api\\PlugletManager_reloadPluglets
SECOND_PLUGLET_FILE=SecondPluglet.jar
LST_FILE_NAME=PlugletManager_reloadPluglets.lst.TEMP
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_Iterator
TEST_HTML=api/PlugletManager_reloadPluglets/PlugletManager_reloadPluglets.html
PLUGLET_DIR=c:\\home\\avm\\pl_test\\build\\classes\\org\\mozilla\\pluglet\\test\\basic
TEST_DIR=c:\\home\\avm\\pl_test\\build\\test\\basic\\api\\PlugletManager_reloadPluglets
SECOND_PLUGLET_FILE=SecondPluglet.jar
LST_FILE_NAME=PlugletManager_reloadPluglets.lst.TEMP
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -1,13 +1,13 @@
<html>
<body>
<blockqute>
This page used to delete second jar file.
Applet DelApp used for this action , so you must grant permisions for it in file .java.policy
</blockquote>
<OBJECT declare codetype="application/java" classid="java:DelApp.class">
<PARAM name=PROPS_FILE_NAME value=TestProperties>
<PARAM name=NEXT_HTML value=PlugletManager_reloadPluglets_pluglet.html>
<PARAM name=NEXT_HTML_TARGET value=pluglet_frame>
</OBJECT>
</body>
<html>
<body>
<blockqute>
This page used to delete second jar file.
Applet DelApp used for this action , so you must grant permisions for it in file .java.policy
</blockquote>
<OBJECT declare codetype="application/java" classid="java:DelApp.class">
<PARAM name=PROPS_FILE_NAME value=TestProperties>
<PARAM name=NEXT_HTML value=PlugletManager_reloadPluglets_pluglet.html>
<PARAM name=NEXT_HTML_TARGET value=pluglet_frame>
</OBJECT>
</body>
</html>

View File

@@ -20,70 +20,70 @@
*/
import java.applet.Applet; //Applet
import java.io.*;
import java.net.URL;
import java.util.Properties;
public class DelApp extends Applet
{
private File secondPluglet = null;
private URL nextHTML = null;
private String target = null;
public void init()
{
String codeBase = getCodeBase().toString();
String fileName = getParameter("PROPS_FILE_NAME");
String htmlName = getParameter("NEXT_HTML");
target = getParameter("NEXT_HTML_TARGET");
if ((fileName == null)||(htmlName == null)||(target == null)) {
printLog("PROPS_FILE_NAME or NEXT_HTML or NEXT_HTML_TARGET parameter not specified for APPLET!");
return;
}
Properties pProps = new Properties();
try {
nextHTML = new URL(codeBase + "/" + htmlName);
URL propsURL = new URL(codeBase + "/" + fileName);
pProps.load(propsURL.openStream());
} catch(Exception e) {
printLog("Exception " + e + " ocurred during applet initialization");
return;
}
String pDir = pProps.getProperty("PLUGLET_DIR",null);
String pName = pProps.getProperty("SECOND_PLUGLET_FILE",null);
String separator = System.getProperty("file.separator");
if ((pDir == null)||(pName == null)) {
printLog("PLUGLET_DIR or SECOND_PLUGLET_FILE properties not initialized");
return;
}
secondPluglet = new File(pDir + separator + pName);
}
public void start()
{
if (!secondPluglet.exists()) {
printLog("File " + secondPluglet + " not exist, nothing to do.");
nextURL();
return;
}
if (!secondPluglet.delete()) {
printLog("Can't delete " + secondPluglet);
return;
} else {
printLog("File: " + secondPluglet + " succesfully deleted");
}
nextURL();
}
private void nextURL()
{
printLog("Going to the next URL: " + nextHTML);
getAppletContext().showDocument(nextHTML,target);
}
private void printLog(String msg)
{
org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2.msgVect.addElement(msg);
}
}
import java.applet.Applet; //Applet
import java.io.*;
import java.net.URL;
import java.util.Properties;
public class DelApp extends Applet
{
private File secondPluglet = null;
private URL nextHTML = null;
private String target = null;
public void init()
{
String codeBase = getCodeBase().toString();
String fileName = getParameter("PROPS_FILE_NAME");
String htmlName = getParameter("NEXT_HTML");
target = getParameter("NEXT_HTML_TARGET");
if ((fileName == null)||(htmlName == null)||(target == null)) {
printLog("PROPS_FILE_NAME or NEXT_HTML or NEXT_HTML_TARGET parameter not specified for APPLET!");
return;
}
Properties pProps = new Properties();
try {
nextHTML = new URL(codeBase + "/" + htmlName);
URL propsURL = new URL(codeBase + "/" + fileName);
pProps.load(propsURL.openStream());
} catch(Exception e) {
printLog("Exception " + e + " ocurred during applet initialization");
return;
}
String pDir = pProps.getProperty("PLUGLET_DIR",null);
String pName = pProps.getProperty("SECOND_PLUGLET_FILE",null);
String separator = System.getProperty("file.separator");
if ((pDir == null)||(pName == null)) {
printLog("PLUGLET_DIR or SECOND_PLUGLET_FILE properties not initialized");
return;
}
secondPluglet = new File(pDir + separator + pName);
}
public void start()
{
if (!secondPluglet.exists()) {
printLog("File " + secondPluglet + " not exist, nothing to do.");
nextURL();
return;
}
if (!secondPluglet.delete()) {
printLog("Can't delete " + secondPluglet);
return;
} else {
printLog("File: " + secondPluglet + " succesfully deleted");
}
nextURL();
}
private void nextURL()
{
printLog("Going to the next URL: " + nextHTML);
getAppletContext().showDocument(nextHTML,target);
}
private void printLog(String msg)
{
org.mozilla.pluglet.test.basic.api.PlugletManager_reloadPluglets_2.msgVect.addElement(msg);
}
}

View File

@@ -20,54 +20,54 @@
# Contributor(s):
TEST_NAME=PlugletManager_reloadPluglets
DEPTH=..\..\..\..\..\..\..\..
#DEPTH1 used to build in the subdirectories, e.g SecondPluglet and deleteApplet
DEPTH1=..\..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_reloadPluglets
DEPTH=..\..\..\..\..\..\..\..
#DEPTH1 used to build in the subdirectories, e.g SecondPluglet and deleteApplet
DEPTH1=..\..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
CLASSPATH1=$(DEPTH1)\build\classes;$(CLASSPATH)
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
CLASSPATH1=$(DEPTH1)\build\classes;$(CLASSPATH)
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: second_pluglet delApplet html properties parameters data_files
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
@xcopy deleteApplet\*.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
second_pluglet:
@cd SecondPluglet
$(JDKHOME)\bin\javac -classpath $(CLASSPATH1) *.java
@$(JDKHOME)\bin\jar cvfm SecondPluglet.jar manifest *.class
@cd ..
delApplet:
@cd deleteApplet
$(JDKHOME)\bin\javac -classpath $(CLASSPATH1) DelApp.java
@cd ..
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: second_pluglet delApplet html properties parameters data_files
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
@xcopy deleteApplet\*.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
second_pluglet:
@cd SecondPluglet
$(JDKHOME)\bin\javac -classpath $(CLASSPATH1) *.java
@$(JDKHOME)\bin\jar cvfm SecondPluglet.jar manifest *.class
@cd ..
delApplet:
@cd deleteApplet
$(JDKHOME)\bin\javac -classpath $(CLASSPATH1) DelApp.java
@cd ..
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
#We need to do it for deleteApplet
@xcopy TestProperties $(HTML_DEST_DIR)\$(TEST_NAME)
parameters:
@xcopy $(TEST_NAME).lst $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
#We need to do it for deleteApplet
@xcopy TestProperties $(HTML_DEST_DIR)\$(TEST_NAME)
parameters:
@xcopy $(TEST_NAME).lst $(DEST_DIR)
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
#Copy second pluglet jar in parameters dir
#Note, that this jar file will be copied in $PLUGLET dir by test pluglet before execution
#of reload pluglets.
data_files:
@xcopy SecondPluglet\SecondPluglet.jar $(DEST_DIR)
@xcopy deleteApplet\DelApp.class $(HTML_DEST_DIR)\$(TEST_NAME)
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.class
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@del $(DEST_DIR)\SecondPluglet.jar
@del SecondPluglet\SecondPluglet.jar
@del SecondPluglet\*.class
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
#Copy second pluglet jar in parameters dir
#Note, that this jar file will be copied in $PLUGLET dir by test pluglet before execution
#of reload pluglets.
data_files:
@xcopy SecondPluglet\SecondPluglet.jar $(DEST_DIR)
@xcopy deleteApplet\DelApp.class $(HTML_DEST_DIR)\$(TEST_NAME)
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.class
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@del $(DEST_DIR)\SecondPluglet.jar
@del SecondPluglet\SecondPluglet.jar
@del SecondPluglet\*.class

View File

@@ -20,160 +20,160 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import java.security.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
import java.lang.reflect.*;
public class PlugletManager_reloadPluglets_2 implements Test
{
private static String destPluglet = "unset";
public static Vector msgVect = new Vector();
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import java.security.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
import java.lang.reflect.*;
public class PlugletManager_reloadPluglets_2 implements Test
{
private static String destPluglet = "unset";
public static Vector msgVect = new Vector();
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_reloadPluglets_2()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_reloadPluglets_2()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_reloadPluglets_2");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_reloadPluglets_2");
return;
}
String destDir = context.getProperty("PLUGLET_DIR");
String sourceDir = context.getTestDir();
String fileName = context.getProperty("SECOND_PLUGLET_FILE");
TestContext.printLog("Delete Applet says{ " );
for(int i=0;i<msgVect.size();i++) {
TestContext.printLog((String)msgVect.elementAt(i));
}
TestContext.printLog("}");
if(((Boolean)copySecondPluglet(sourceDir,destDir,fileName)).booleanValue()) {
context.printLog("Second pluglet library was succesfully copied..");
PlugletManager_obj.reloadPluglets(((Boolean)vectorOfParameters.elementAt(0)).booleanValue());
System.err.println("DEBUG: Void method PlugletManager_reloadPluglets(" + ((Boolean)vectorOfParameters.elementAt(0)).booleanValue() + ")");
return;
}
TestContext.registerFAILED("Something wrong when copying new pluglet library.\n" +
" Possible second pluglet jar file already exist. \n" +
"Remove it and restart test\n");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletManager_reloadPluglets_2");
return;
}
if ( context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext) of PlugletManager_reloadPluglets_2");
return;
}
String destDir = context.getProperty("PLUGLET_DIR");
String sourceDir = context.getTestDir();
String fileName = context.getProperty("SECOND_PLUGLET_FILE");
TestContext.printLog("Delete Applet says{ " );
for(int i=0;i<msgVect.size();i++) {
TestContext.printLog((String)msgVect.elementAt(i));
}
TestContext.printLog("}");
if(((Boolean)copySecondPluglet(sourceDir,destDir,fileName)).booleanValue()) {
context.printLog("Second pluglet library was succesfully copied..");
PlugletManager_obj.reloadPluglets(((Boolean)vectorOfParameters.elementAt(0)).booleanValue());
System.err.println("DEBUG: Void method PlugletManager_reloadPluglets(" + ((Boolean)vectorOfParameters.elementAt(0)).booleanValue() + ")");
return;
}
TestContext.registerFAILED("Something wrong when copying new pluglet library.\n" +
" Possible second pluglet jar file already exist. \n" +
"Remove it and restart test\n");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
private Object copySecondPluglet(String sDir, String dDir, String fName)
{
final String sourceDir = sDir;
final String destDir = dDir;
final String fileName = fName;
return AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
String separator = System.getProperty("file.separator");
try {
File outputFile = new File(destDir + separator + fileName);
File inputFile = new File(sourceDir + separator + fileName);
int bl = (int)inputFile.length();
if (outputFile.exists()) {
TestContext.printLog("SecondPluglet already exist in %PLUGLET% dir");
return (Object)(new Boolean(false));
}
// outputFile.deleteOnExit();
byte buf[] = new byte[bl];
System.err.println(destDir + separator + fileName);
FileInputStream fr = new FileInputStream(inputFile);
FileOutputStream fw = new FileOutputStream(outputFile);
if(fr.read(buf)<bl) {
TestContext.printLog("WARNING: Not all data copied to new jar");
}
fw.write(buf);
fw.flush();
fr.close();
fw.close();
return (Object)(new Boolean(true));
} catch (IOException e) {
e.printStackTrace();
return (Object)(new Boolean(false));
}
}
});
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
private Object copySecondPluglet(String sDir, String dDir, String fName)
{
final String sourceDir = sDir;
final String destDir = dDir;
final String fileName = fName;
return AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
String separator = System.getProperty("file.separator");
try {
File outputFile = new File(destDir + separator + fileName);
File inputFile = new File(sourceDir + separator + fileName);
int bl = (int)inputFile.length();
if (outputFile.exists()) {
TestContext.printLog("SecondPluglet already exist in %PLUGLET% dir");
return (Object)(new Boolean(false));
}
// outputFile.deleteOnExit();
byte buf[] = new byte[bl];
System.err.println(destDir + separator + fileName);
FileInputStream fr = new FileInputStream(inputFile);
FileOutputStream fw = new FileOutputStream(outputFile);
if(fr.read(buf)<bl) {
TestContext.printLog("WARNING: Not all data copied to new jar");
}
fw.write(buf);
fw.flush();
fr.close();
fw.close();
return (Object)(new Boolean(true));
} catch (IOException e) {
e.printStackTrace();
return (Object)(new Boolean(false));
}
}
});
}
}

View File

@@ -20,124 +20,124 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_reloadPluglets_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_reloadPluglets_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_reloadPluglets_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_reloadPluglets_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[1];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is boolean
result = (Object)(new Boolean(paramValue[0]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[1];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is boolean
result = (Object)(new Boolean(paramValue[0]));
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}

View File

@@ -1,30 +1,30 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
iId = window.setInterval('verifyUserAgent()',timeout);
}
function verifyUserAgent()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0.actionPerformed) {
var userAgent = window.navigator.userAgent;
Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0.verifyUserAgent(userAgent);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet with PlugletManager_userAgent test.
UserAgent value will be passed to pluglet via JavaScript
</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
iId = window.setInterval('verifyUserAgent()',timeout);
}
function verifyUserAgent()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0.actionPerformed) {
var userAgent = window.navigator.userAgent;
Packages.org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0.verifyUserAgent(userAgent);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet with PlugletManager_userAgent test.
UserAgent value will be passed to pluglet via JavaScript
</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>

View File

@@ -1,6 +1,6 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_Iterator
TEST_HTML=api/PlugletManager_userAgent/PlugletManager_userAgent.html
#CURRENT_USER_AGENT=Mozilla/5.0 [en] (Windows;I)
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletManager_userAgent_Iterator
TEST_HTML=api/PlugletManager_userAgent/PlugletManager_userAgent.html
#CURRENT_USER_AGENT=Mozilla/5.0 [en] (Windows;I)
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,27 +20,27 @@
# Contributor(s):
TEST_NAME=PlugletManager_userAgent
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletManager_userAgent
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
combinations:
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties

View File

@@ -20,108 +20,108 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_userAgent_0 implements Test
{
public static boolean actionPerformed = false;
private static String userAgent = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletManager_userAgent_0 implements Test
{
public static boolean actionPerformed = false;
private static String userAgent = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletManager_userAgent_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletManager_userAgent_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletManager_userAgent_0");
return;
}
if (context.failedIsRegistered()) {
return;
}
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext)" +
" of PlugletManager_userAgent_0");
return;
}
userAgent = PlugletManager_obj.userAgent();
actionPerformed = true;
System.err.println("DEBUG: PlugletManager_userAgent returns \"" + userAgent + "\" value");
}
public static void verifyUserAgent(String curUserAgent)
{
if (userAgent == null) {
TestContext.registerFAILED("PlugletManager_userAgent returns null value");
return;
}
if ( curUserAgent.equals(userAgent)) {
TestContext.registerPASSED("PlugletManager_userAgent returns \"" + userAgent + "\" value");
} else {
TestContext.registerFAILED("PlugletManager_userAgent returns \"" + userAgent +
"\" value. Legal value is \"" + curUserAgent + "\"");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletManager PlugletManager_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletManager_userAgent_0");
return;
}
if (context.failedIsRegistered()) {
return;
}
PlugletManager_obj = context.getPlugletManager();
if( PlugletManager_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletManager passed in execute(TestContext)" +
" of PlugletManager_userAgent_0");
return;
}
userAgent = PlugletManager_obj.userAgent();
actionPerformed = true;
System.err.println("DEBUG: PlugletManager_userAgent returns \"" + userAgent + "\" value");
}
public static void verifyUserAgent(String curUserAgent)
{
if (userAgent == null) {
TestContext.registerFAILED("PlugletManager_userAgent returns null value");
return;
}
if ( curUserAgent.equals(userAgent)) {
TestContext.registerPASSED("PlugletManager_userAgent returns \"" + userAgent + "\" value");
} else {
TestContext.registerFAILED("PlugletManager_userAgent returns \"" + userAgent +
"\" value. Legal value is \"" + curUserAgent + "\"");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -1,26 +1,26 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
iId = window.setInterval('verifyMIMEType("application/x-api-pluglet")',timeout);
}
function verifyMIMEType(MIMEType)
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0.verifyMIMEType(MIMEType);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_getMIMEType test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100 id=121>
</body>
</hmtl>
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
iId = window.setInterval('verifyMIMEType("application/x-api-pluglet")',timeout);
}
function verifyMIMEType(MIMEType)
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0.verifyMIMEType(MIMEType);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_getMIMEType test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100 id=121>
</body>
</hmtl>

View File

@@ -1,8 +1,8 @@
#TestProperties file
#At PLUGLET_INSTANCE_INITIALIZE good value isn't passed from JS, so should use START or later
RUN_STAGES=PLUGLET_INSTANCE_START
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_Iterator
TEST_HTML=api/PlugletPeer_getMIMEType/PlugletPeer_getMIMEType.html
#TEST_PLUGLET_MIME_TYPE=application/x-simple-pluglet
#TestProperties file
#At PLUGLET_INSTANCE_INITIALIZE good value isn't passed from JS, so should use START or later
RUN_STAGES=PLUGLET_INSTANCE_START
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMIMEType_Iterator
TEST_HTML=api/PlugletPeer_getMIMEType/PlugletPeer_getMIMEType.html
#TEST_PLUGLET_MIME_TYPE=application/x-simple-pluglet
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,25 +20,25 @@
# Contributor(s):
TEST_NAME=PlugletPeer_getMIMEType
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_getMIMEType
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
combinations:
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties

View File

@@ -20,110 +20,110 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMIMEType_0 implements Test
{
public static boolean actionPerformed = false;
private static String MIMEType = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMIMEType_0 implements Test
{
public static boolean actionPerformed = false;
private static String MIMEType = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getMIMEType_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getMIMEType_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getMIMEType_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext)" +
" of PlugletPeer_getMIMEType_0");
return;
}
MIMEType = PlugletPeer_obj.getMIMEType();
actionPerformed = true;
System.err.println("DEBUG: PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
}
public static void verifyMIMEType(String type)
{
if (MIMEType == null) {
TestContext.registerFAILED("null MIME type returned instead of \"" + type +"\"");
}
if (type.equals(MIMEType)) {
TestContext.registerPASSED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
} else {
TestContext.registerFAILED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType +
"\" value, different from \"" + type +"\"");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getMIMEType_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext)" +
" of PlugletPeer_getMIMEType_0");
return;
}
MIMEType = PlugletPeer_obj.getMIMEType();
actionPerformed = true;
System.err.println("DEBUG: PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
}
public static void verifyMIMEType(String type)
{
if (MIMEType == null) {
TestContext.registerFAILED("null MIME type returned instead of \"" + type +"\"");
}
if (type.equals(MIMEType)) {
TestContext.registerPASSED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
} else {
TestContext.registerFAILED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType +
"\" value, different from \"" + type +"\"");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -20,79 +20,79 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMIMEType_Iterator implements TestListIterator
{
TestContext context = null;
int flag = 0;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMIMEType_Iterator implements TestListIterator
{
TestContext context = null;
int flag = 0;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getMIMEType_Iterator()
{
//Method has 0 parameters
//Constructor is empty
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getMIMEType_Iterator()
{
//Method has 0 parameters
//Constructor is empty
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
return true;
}
public boolean next()
{
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if (flag == 0) //Only one time we should work(In future may be stress test for many calls :)
{
context.setParameters(new Vector());
flag = 1;
return true;
} else
{
return false;
}
}
}
public boolean initialize(TestContext context)
{
this.context = context;
return true;
}
public boolean next()
{
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if (flag == 0) //Only one time we should work(In future may be stress test for many calls :)
{
context.setParameters(new Vector());
flag = 1;
return true;
} else
{
return false;
}
}
}

View File

@@ -1,6 +1,6 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMode_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMode_Iterator
TEST_HTML=api/PlugletPeer_getMode/PlugletPeer_getMode.html
EXPECTED_VALUE=1
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMode_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getMode_Iterator
TEST_HTML=api/PlugletPeer_getMode/PlugletPeer_getMode.html
EXPECTED_VALUE=1
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,25 +20,25 @@
# Contributor(s):
TEST_NAME=PlugletPeer_getMode
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_getMode
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
combinations:
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html

View File

@@ -20,98 +20,98 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMode_0 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getMode_0 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getMode_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getMode_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletPeer_getMode_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext) of PlugletPeer_getMode_0");
return;
}
int rt = PlugletPeer_obj.getMode();
System.err.println("DEBUG: PlugletPeer_getMode returns \"" + rt + "\"value");
//Get expected value from properties, for embedded pluglets it equals 1
int expVal = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();
TestContext.printLog("Expected value for this test is " + expVal + "\n");
if (rt == expVal) {
TestContext.registerPASSED("PlugletPeer_getMode returns \"" + rt + "\"value.");
} else {
TestContext.registerFAILED("PlugletPeer_getMode returns \"" + rt + "\"value.");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) of PlugletPeer_getMode_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext) of PlugletPeer_getMode_0");
return;
}
int rt = PlugletPeer_obj.getMode();
System.err.println("DEBUG: PlugletPeer_getMode returns \"" + rt + "\"value");
//Get expected value from properties, for embedded pluglets it equals 1
int expVal = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();
TestContext.printLog("Expected value for this test is " + expVal + "\n");
if (rt == expVal) {
TestContext.registerPASSED("PlugletPeer_getMode returns \"" + rt + "\"value.");
} else {
TestContext.registerFAILED("PlugletPeer_getMode returns \"" + rt + "\"value.");
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -1,39 +1,39 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var allAttributes="";
function init(timeout)
{
for (j=0;j < window.document.body.childNodes.length;j++) {
if(window.document.body.childNodes[j].nodeName == "EMBED") {
for(i=0;i<window.document.body.childNodes[j].attributes.length;i++) {
allAttributes+=window.document.body.childNodes[j].attributes[i].name + " = " + window.document.body.childNodes[j].attributes[i].value + "\n";
}
break;
}
}
java.lang.System.err.println(allAttributes);
//String allAttributes now contains all attributes of EMBED tag, used in this HTML file
iId = window.setInterval('verifyAttr()',timeout);
}
function verifyAttr()
{
java.lang.System.err.println("Verify .." + allAttributes);
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0.verifyAttr(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_getTagInfo test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var allAttributes="";
function init(timeout)
{
for (j=0;j < window.document.body.childNodes.length;j++) {
if(window.document.body.childNodes[j].nodeName == "EMBED") {
for(i=0;i<window.document.body.childNodes[j].attributes.length;i++) {
allAttributes+=window.document.body.childNodes[j].attributes[i].name + " = " + window.document.body.childNodes[j].attributes[i].value + "\n";
}
break;
}
}
java.lang.System.err.println(allAttributes);
//String allAttributes now contains all attributes of EMBED tag, used in this HTML file
iId = window.setInterval('verifyAttr()',timeout);
}
function verifyAttr()
{
java.lang.System.err.println("Verify .." + allAttributes);
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0.verifyAttr(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_getTagInfo test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
</body>
</hmtl>

View File

@@ -1,5 +1,5 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_Iterator
TEST_HTML=api/PlugletPeer_getTagInfo/PlugletPeer_getTagInfo.html
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getTagInfo_Iterator
TEST_HTML=api/PlugletPeer_getTagInfo/PlugletPeer_getTagInfo.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,26 +20,26 @@
# Contributor(s):
TEST_NAME=PlugletPeer_getTagInfo
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_getTagInfo
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
combinations:
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties
echo basic/api/$(TEST_NAME)>>$(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\TestProperties

View File

@@ -20,120 +20,120 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getTagInfo_0 implements Test
{
public static boolean actionPerformed = false;
private static String TEST_ATTRIBUTE_NAME = "type";
private static PlugletTagInfo info = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getTagInfo_0 implements Test
{
public static boolean actionPerformed = false;
private static String TEST_ATTRIBUTE_NAME = "type";
private static PlugletTagInfo info = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getTagInfo_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getTagInfo_0()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getTagInfo_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
info = PlugletPeer_obj.getTagInfo();
actionPerformed = true;
System.err.println("DEBUG: PlugletPeer_getTagInfo returns \"" + info + "\"value");
}
public static void verifyAttr(String allAttrs)
{
if (info == null) {
TestContext.registerFAILED("PlugletPeer_getTagInfo returns null value");
return;
}
Properties attr = new Properties();
try {
attr.load((InputStream)new ByteArrayInputStream(allAttrs.getBytes()));
} catch (Exception e) {
TestContext.registerFAILED("Exception " + e + " ocurred");
return;
}
String attrValue = info.getAttribute(TEST_ATTRIBUTE_NAME);
if (attrValue == null) {
TestContext.registerFAILED("null value returned for attribute \"" + TEST_ATTRIBUTE_NAME +
"\" from PlugletTagInfo object");
return;
}
String goodAttrValue = attr.getProperty(TEST_ATTRIBUTE_NAME,null);
if (goodAttrValue == null) {
TestContext.registerFAILED("Attribute with name \"" + TEST_ATTRIBUTE_NAME + "\" isn't passed from JS");
return;
}
if (goodAttrValue.equals(attrValue)) {
TestContext.registerPASSED("Good TagInfo object returned");
return;
} else {
TestContext.registerFAILED("Strange TagInfo object returned, " + TEST_ATTRIBUTE_NAME + "=\"" +
attrValue + "\" instead of \"" + goodAttrValue + "\"");
return;
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getTagInfo_0");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
info = PlugletPeer_obj.getTagInfo();
actionPerformed = true;
System.err.println("DEBUG: PlugletPeer_getTagInfo returns \"" + info + "\"value");
}
public static void verifyAttr(String allAttrs)
{
if (info == null) {
TestContext.registerFAILED("PlugletPeer_getTagInfo returns null value");
return;
}
Properties attr = new Properties();
try {
attr.load((InputStream)new ByteArrayInputStream(allAttrs.getBytes()));
} catch (Exception e) {
TestContext.registerFAILED("Exception " + e + " ocurred");
return;
}
String attrValue = info.getAttribute(TEST_ATTRIBUTE_NAME);
if (attrValue == null) {
TestContext.registerFAILED("null value returned for attribute \"" + TEST_ATTRIBUTE_NAME +
"\" from PlugletTagInfo object");
return;
}
String goodAttrValue = attr.getProperty(TEST_ATTRIBUTE_NAME,null);
if (goodAttrValue == null) {
TestContext.registerFAILED("Attribute with name \"" + TEST_ATTRIBUTE_NAME + "\" isn't passed from JS");
return;
}
if (goodAttrValue.equals(attrValue)) {
TestContext.registerPASSED("Good TagInfo object returned");
return;
} else {
TestContext.registerFAILED("Strange TagInfo object returned, " + TEST_ATTRIBUTE_NAME + "=\"" +
attrValue + "\" instead of \"" + goodAttrValue + "\"");
return;
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -20,78 +20,78 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getTagInfo_Iterator implements TestListIterator
{
TestContext context = null;
public static int flag = 0;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getTagInfo_Iterator implements TestListIterator
{
TestContext context = null;
public static int flag = 0;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getTagInfo_Iterator()
{
//Method has 0 parameters
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getTagInfo_Iterator()
{
//Method has 0 parameters
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
return true;
}
public boolean next()
{
if (context == null)
{
TestContext.registerFAILED("context not initialized");
return false;
}
if (flag == 0) //Only one time we should work(In future may be stress test for many calls :)
{
context.setParameters(new Vector());
flag = 1;
return true;
} else
{
return false;
}
}
}
public boolean initialize(TestContext context)
{
this.context = context;
return true;
}
public boolean next()
{
if (context == null)
{
TestContext.registerFAILED("context not initialized");
return false;
}
if (flag == 0) //Only one time we should work(In future may be stress test for many calls :)
{
context.setParameters(new Vector());
flag = 1;
return true;
} else
{
return false;
}
}
}

View File

@@ -1,4 +1,4 @@
0: 0
1: Integer.MIN_VALUE
2: Integer.MAX_VALUE
3: NETSCAPE_WINDOW_FOR_GET_VALUE
0: 0
1: Integer.MIN_VALUE
2: Integer.MAX_VALUE
3: NETSCAPE_WINDOW_FOR_GET_VALUE

View File

@@ -1,7 +1,7 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getValue_3
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getValue_Iterator
TEST_HTML=api/PlugletPeer_getValue/PlugletPeer_getValue.html
LST_FILE_NAME=PlugletPeer_getValue.lst.TEMP
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
VARIABLES=3
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getValue_3
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_getValue_Iterator
TEST_HTML=api/PlugletPeer_getValue/PlugletPeer_getValue.html
LST_FILE_NAME=PlugletPeer_getValue.lst.TEMP
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
VARIABLES=3

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletPeer_getValue
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_getValue
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -20,114 +20,114 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getValue_3 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getValue_3 implements Test
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getValue_3()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getValue_3()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
Vector vectorOfParameters = context.getParameters();
if( vectorOfParameters == null ) {
TestContext.registerFAILED("ERROR:null parameters vector passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
String variables = context.getProperty("VARIABLES");
System.err.println("Variables is \"" + variables + "\"");
StringTokenizer st = new StringTokenizer(variables,",");
int[] goodVars = new int[st.countTokens()];
for(int i=0;i<goodVars.length;i++) {
goodVars[i] = (new Integer(st.nextToken().trim())).intValue();
System.err.println("Goodvars is \"" + goodVars[i] + "\"");
}
int var = ((Integer)vectorOfParameters.elementAt(0)).intValue();
String rt = PlugletPeer_obj.getValue(var);
for(int i=0;i<goodVars.length;i++) {
if(var == goodVars[i]) {
TestContext.registerFAILED("PlugletPeer_getValue(" + var + ") returns \"" + rt +
"\" value\n Test is't calibrated for real variables.");
return;
}
}
TestContext.registerPASSED("getValue doesn't crashed on illegal value \"" + var +
"\" and returns \"" + rt + "\" value");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
Vector vectorOfParameters = context.getParameters();
if( vectorOfParameters == null ) {
TestContext.registerFAILED("ERROR:null parameters vector passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext)" +
" of PlugletPeer_getValue_3");
return;
}
String variables = context.getProperty("VARIABLES");
System.err.println("Variables is \"" + variables + "\"");
StringTokenizer st = new StringTokenizer(variables,",");
int[] goodVars = new int[st.countTokens()];
for(int i=0;i<goodVars.length;i++) {
goodVars[i] = (new Integer(st.nextToken().trim())).intValue();
System.err.println("Goodvars is \"" + goodVars[i] + "\"");
}
int var = ((Integer)vectorOfParameters.elementAt(0)).intValue();
String rt = PlugletPeer_obj.getValue(var);
for(int i=0;i<goodVars.length;i++) {
if(var == goodVars[i]) {
TestContext.registerFAILED("PlugletPeer_getValue(" + var + ") returns \"" + rt +
"\" value\n Test is't calibrated for real variables.");
return;
}
}
TestContext.registerPASSED("getValue doesn't crashed on illegal value \"" + var +
"\" and returns \"" + rt + "\" value");
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -20,140 +20,140 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getValue_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_getValue_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_getValue_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_getValue_Iterator()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[1];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is int
try {
if (paramValue[0].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[0].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[0].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[0]));
}
}catch(NumberFormatException e)
{
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
}
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[1];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is int
try {
if (paramValue[0].equals("Integer.MIN_VALUE"))
{
result = (Object)(new Integer(Integer.MIN_VALUE));
} else if (paramValue[0].equals("Integer.MAX_VALUE"))
{
result = (Object)(new Integer(Integer.MAX_VALUE));
} else if (paramValue[0].equals("0"))
{
result = (Object)(new Integer(0));
} else
{
result = (Object)(new Integer(paramValue[0]));
}
}catch(NumberFormatException e)
{
TestContext.registerFAILED("NumberFormatException thrown.Wrong parameters file?");
}
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}

View File

@@ -1,2 +1,2 @@
null'0, text/plain'0, text/html'0, image/gif'0, application/x-java-vm'0, dummy'0, dummy_type/dummy_subtype'1, *'1, */*'1
null'0, text/plain'0, text/html'0, image/gif'0, application/x-java-vm'0, dummy'0, dummy_type/dummy_subtype'1, *'1, */*'1
null'0, _self'0, _parent'1, _top'1, EXISTING_TARGET_FOR_NEW_STREAM'0, NONEXISTING_TARGET_FOR_NEW_STREAM'1

View File

@@ -1,6 +1,6 @@
<html>
<frameset rows=100,*>
<frame src=PlugletPeer_newStream_empty.html name=empty>
<frame src=PlugletPeer_newStream_plugletFrameset.html name=_parent>
</frameset>
</hmtl>
<html>
<frameset rows=100,*>
<frame src=PlugletPeer_newStream_empty.html name=empty>
<frame src=PlugletPeer_newStream_plugletFrameset.html name=_parent>
</frameset>
</hmtl>

View File

@@ -1,45 +1,45 @@
0: null, null
1: null, _self
2: null, _parent
3: null, _top
4: null, EXISTING_TARGET_FOR_NEW_STREAM
5: null, NONEXISTING_TARGET_FOR_NEW_STREAM
6: text/plain, null
7: text/plain, _self
8: text/plain, _parent
9: text/plain, _top
10: text/plain, EXISTING_TARGET_FOR_NEW_STREAM
11: text/plain, NONEXISTING_TARGET_FOR_NEW_STREAM
12: text/html, null
13: text/html, _self
14: text/html, _parent
15: text/html, _top
16: text/html, EXISTING_TARGET_FOR_NEW_STREAM
17: text/html, NONEXISTING_TARGET_FOR_NEW_STREAM
18: image/gif, null
19: image/gif, _self
20: image/gif, _parent
21: image/gif, _top
22: image/gif, EXISTING_TARGET_FOR_NEW_STREAM
23: image/gif, NONEXISTING_TARGET_FOR_NEW_STREAM
24: application/x-java-vm, null
25: application/x-java-vm, _self
26: application/x-java-vm, _parent
27: application/x-java-vm, _top
28: application/x-java-vm, EXISTING_TARGET_FOR_NEW_STREAM
29: application/x-java-vm, NONEXISTING_TARGET_FOR_NEW_STREAM
30: dummy, null
31: dummy, _self
32: dummy, _parent
33: dummy, _top
34: dummy, EXISTING_TARGET_FOR_NEW_STREAM
35: dummy, NONEXISTING_TARGET_FOR_NEW_STREAM
36: dummy_type/dummy_subtype, null
37: dummy_type/dummy_subtype, _self
38: dummy_type/dummy_subtype, EXISTING_TARGET_FOR_NEW_STREAM
39: *, null
40: *, _self
41: *, EXISTING_TARGET_FOR_NEW_STREAM
42: */*, null
43: */*, _self
44: */*, EXISTING_TARGET_FOR_NEW_STREAM
0: null, null
1: null, _self
2: null, _parent
3: null, _top
4: null, EXISTING_TARGET_FOR_NEW_STREAM
5: null, NONEXISTING_TARGET_FOR_NEW_STREAM
6: text/plain, null
7: text/plain, _self
8: text/plain, _parent
9: text/plain, _top
10: text/plain, EXISTING_TARGET_FOR_NEW_STREAM
11: text/plain, NONEXISTING_TARGET_FOR_NEW_STREAM
12: text/html, null
13: text/html, _self
14: text/html, _parent
15: text/html, _top
16: text/html, EXISTING_TARGET_FOR_NEW_STREAM
17: text/html, NONEXISTING_TARGET_FOR_NEW_STREAM
18: image/gif, null
19: image/gif, _self
20: image/gif, _parent
21: image/gif, _top
22: image/gif, EXISTING_TARGET_FOR_NEW_STREAM
23: image/gif, NONEXISTING_TARGET_FOR_NEW_STREAM
24: application/x-java-vm, null
25: application/x-java-vm, _self
26: application/x-java-vm, _parent
27: application/x-java-vm, _top
28: application/x-java-vm, EXISTING_TARGET_FOR_NEW_STREAM
29: application/x-java-vm, NONEXISTING_TARGET_FOR_NEW_STREAM
30: dummy, null
31: dummy, _self
32: dummy, _parent
33: dummy, _top
34: dummy, EXISTING_TARGET_FOR_NEW_STREAM
35: dummy, NONEXISTING_TARGET_FOR_NEW_STREAM
36: dummy_type/dummy_subtype, null
37: dummy_type/dummy_subtype, _self
38: dummy_type/dummy_subtype, EXISTING_TARGET_FOR_NEW_STREAM
39: *, null
40: *, _self
41: *, EXISTING_TARGET_FOR_NEW_STREAM
42: */*, null
43: */*, _self
44: */*, EXISTING_TARGET_FOR_NEW_STREAM

View File

@@ -1,6 +1,6 @@
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This a empty winow. Just for making depth 1 for pluglet frame.</blockquote>
</body>
</hmtl>
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This a empty winow. Just for making depth 1 for pluglet frame.</blockquote>
</body>
</hmtl>

View File

@@ -1,26 +1,26 @@
<html>
<head>
This HTML was written to new stream and shold be shown correctly with last and firs labels
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4.checkResult(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletPeer_newStream test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>
<html>
<head>
This HTML was written to new stream and shold be shown correctly with last and firs labels
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4.checkResult(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletPeer_newStream test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>

View File

@@ -1,7 +1,7 @@
<html>
<frameset cols=*,* name=_parent>
<frame src=PlugletPeer_newStream_pluglet.html name=_self>
<!--frame src=http://earth:11000/jsobj.html name=exist_target_for_new_stream-->
<frame src=PlugletPeer_newStream_exist_target.html name=exist_target_for_new_stream>
</frameset>
</hmtl>
<html>
<frameset cols=*,* name=_parent>
<frame src=PlugletPeer_newStream_pluglet.html name=_self>
<!--frame src=http://earth:11000/jsobj.html name=exist_target_for_new_stream-->
<frame src=PlugletPeer_newStream_exist_target.html name=exist_target_for_new_stream>
</frameset>
</hmtl>

View File

@@ -1,10 +1,10 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_Iterator
TEST_HTML=api/PlugletPeer_newStream_0/PlugletPeer_newStream.html
#Note that property LST_FILE_NAME supported not for all tests
LST_FILE_NAME=PlugletPeer_newStream_0.lst.TEMP
#Note, that INPUT_FILE will be read directly from filesystem, so you shoul
# use \ as file separator on Win32 and / on UNIX-like system's
INPUT_FILE=PlugletPeer_newStream_inputData.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_Iterator
TEST_HTML=api/PlugletPeer_newStream_0/PlugletPeer_newStream.html
#Note that property LST_FILE_NAME supported not for all tests
LST_FILE_NAME=PlugletPeer_newStream_0.lst.TEMP
#Note, that INPUT_FILE will be read directly from filesystem, so you shoul
# use \ as file separator on Win32 and / on UNIX-like system's
INPUT_FILE=PlugletPeer_newStream_inputData.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,29 +20,29 @@
# Contributor(s):
TEST_NAME=PlugletPeer_newStream_0
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_newStream_0
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@xcopy PlugletPeer_newStream_inputData.html $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -1,2 +1,2 @@
text/html'0
text/html'0
null'0, _self'0, _parent'1, _top'1, EXISTING_TARGET_FOR_NEW_STREAM'0, NONEXISTING_TARGET_FOR_NEW_STREAM'1

View File

@@ -1,6 +1,6 @@
<html>
<frameset rows=100,*>
<frame src=PlugletPeer_newStream_empty.html name=empty>
<frame src=PlugletPeer_newStream_plugletFrameset.html name=_parent>
</frameset>
</hmtl>
<html>
<frameset rows=100,*>
<frame src=PlugletPeer_newStream_empty.html name=empty>
<frame src=PlugletPeer_newStream_plugletFrameset.html name=_parent>
</frameset>
</hmtl>

View File

@@ -1,6 +1,6 @@
0: text/html, null
1: text/html, _self
2: text/html, _parent
3: text/html, _top
4: text/html, EXISTING_TARGET_FOR_NEW_STREAM
5: text/html, NONEXISTING_TARGET_FOR_NEW_STREAM
0: text/html, null
1: text/html, _self
2: text/html, _parent
3: text/html, _top
4: text/html, EXISTING_TARGET_FOR_NEW_STREAM
5: text/html, NONEXISTING_TARGET_FOR_NEW_STREAM

View File

@@ -1,6 +1,6 @@
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This a empty winow. Just for making depth 1 for pluglet frame.</blockquote>
</body>
</hmtl>
<html>
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This a empty winow. Just for making depth 1 for pluglet frame.</blockquote>
</body>
</hmtl>

View File

@@ -1,26 +1,26 @@
<html>
<head>
This HTML was written to new stream and shold be shown correctly with last and firs labels
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4.checkResult(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletPeer_newStream test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>
<html>
<head>
This HTML was written to new stream and shold be shown correctly with last and firs labels
<SCRIPT Language="JavaScript">
<!--
function registerResults()
{
var currentWindow = window.name;
var isTop = (window.parent == window);
Packages.org.mozilla.pluglet.test.basic.TestContext.printLog("JavaScript result:Current window = "
+ currentWindow + ", isTop = " + isTop);
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4.checkResult(currentWindow,isTop);
}
//-->
</script>
</head>
<body onLoad="registerResults()">
This is first line of this HTML<BR>
<blockquote>
PlugletPeer_newStream test.
Results will be passed to test via JavaScript.</blockquote>
This is last line of this HTML<BR>
</body>
</hmtl>

View File

@@ -1,7 +1,7 @@
<html>
<frameset cols=*,* name=_parent>
<frame src=PlugletPeer_newStream_pluglet.html name=_self>
<!--frame src=http://earth:11000/jsobj.html name=exist_target_for_new_stream-->
<frame src=PlugletPeer_newStream_exist_target.html name=exist_target_for_new_stream>
</frameset>
</hmtl>
<html>
<frameset cols=*,* name=_parent>
<frame src=PlugletPeer_newStream_pluglet.html name=_self>
<!--frame src=http://earth:11000/jsobj.html name=exist_target_for_new_stream-->
<frame src=PlugletPeer_newStream_exist_target.html name=exist_target_for_new_stream>
</frameset>
</hmtl>

View File

@@ -1,10 +1,10 @@
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_Iterator
TEST_HTML=api/PlugletPeer_newStream_1/PlugletPeer_newStream.html
#Note that property LST_FILE_NAME supported not for all tests
LST_FILE_NAME=PlugletPeer_newStream_1.lst.TEMP
#Note, that INPUT_FILE will be read directly from filesystem, so you shoul
# use \ as file separator on Win32 and / on UNIX-like system's
INPUT_FILE=PlugletPeer_newStream_inputData.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
RUN_STAGES=PLUGLET_INSTANCE_INITIALIZE
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_4
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletPeer_newStream_Iterator
TEST_HTML=api/PlugletPeer_newStream_1/PlugletPeer_newStream.html
#Note that property LST_FILE_NAME supported not for all tests
LST_FILE_NAME=PlugletPeer_newStream_1.lst.TEMP
#Note, that INPUT_FILE will be read directly from filesystem, so you shoul
# use \ as file separator on Win32 and / on UNIX-like system's
INPUT_FILE=PlugletPeer_newStream_inputData.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar

View File

@@ -20,31 +20,31 @@
# Contributor(s):
TEST_NAME=PlugletPeer_newStream_1
DEPTH=..\..\..\..\..\..\..\..
TEST_NAME=PlugletPeer_newStream_1
DEPTH=..\..\..\..\..\..\..\..
UTIL_DIR=$(DEPTH)\utils
BUILD_DIR=$(DEPTH)\build
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
CONFIG_FILE=$(DEPTH)\config\CommonProperties
BASIC_PATH=test\basic\api
DEST_DIR=$(BUILD_DIR)\$(BASIC_PATH)\$(TEST_NAME)
MAKE_PARAM=..\makeParameters.pl
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
MAKE_COMB=..\makeCombinations.pl
default: all
all: html properties parameters
html:
@xcopy *.html $(HTML_DEST_DIR)\$(TEST_NAME) /I
properties:
@-1 mkdir $(DEST_DIR)
@xcopy PlugletPeer_newStream_inputData.html $(DEST_DIR)
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
@perl $(UTIL_DIR)\configurator.pl $(CONFIG_FILE) $(DEST_DIR)\TestProperties TestProperties
parameters:
@$(MAKE_PARAM) TestParameters $(TEST_NAME).lst $(DEST_DIR)\$(TEST_NAME).lst
@echo Done
combinations:
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties
@$(MAKE_COMB) ParamCombinations $(TEST_NAME).lst $(BUILD_DIR)\$(BASIC_PATH)\BWTest.lst.ORIG
clobber:
@del $(HTML_DEST_DIR)\$(TEST_NAME)\*.html
@del $(DEST_DIR)\$(TEST_NAME).lst
@del $(DEST_DIR)\TestProperties

View File

@@ -20,177 +20,177 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_newStream_4 implements Test
{
private static String targetWindow = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_newStream_4 implements Test
{
private static String targetWindow = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_newStream_4()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_newStream_4()
{
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Execute Method
*
* @param contex TestContext reference with properties and parameters
* @return void, the result set to true or false via context
*
***********************************************************
*/
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) " +
"of PlugletPeer_newStream_4");
return;
}
if (context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext) " +
"of PlugletPeer_newStream_4");
return;
}
targetWindow = (String)vectorOfParameters.elementAt(1);
OutputStream rt = PlugletPeer_obj.newStream((String)vectorOfParameters.elementAt(0),targetWindow);
if ( rt == null ) {
TestContext.registerFAILED("PlugletPeer_newStream(" + (String)vectorOfParameters.elementAt(0) +
"," + targetWindow + ") returns null");
return;
}
TestContext.printLog("DEBUG: PlugletPeer_newStream(" + (String)vectorOfParameters.elementAt(0) +
"," + targetWindow + ") returns \"" + rt + "\" value");
//Prepare to writing to new stream
String inputFileName = context.getProperty("INPUT_FILE");
String testDir = context.getTestDir();
String fileSeparator = System.getProperty("file.separator");
String fullName = testDir + fileSeparator + inputFileName;
if (inputFileName == null) {
TestContext.registerFAILED("Property \"INPUT_FILE\" isn't set. So test can't read input file");
return;
}
FileInputStream fis = null;
File inputFile = new File(fullName);
int dataLength = (int)inputFile.length();
int dataRead = 0;
byte[] buf = new byte[dataLength];
try {
fis = new FileInputStream(inputFile);
} catch (Exception e) {
TestContext.registerFAILED("Can't open file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try{
while(dataRead<dataLength)
{
dataRead += fis.read(buf,dataRead,dataLength);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try {
fis.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try {
rt.write(buf,0,dataLength);
rt.flush();
rt.close();
} catch(Exception e) {
TestContext.registerFAILED("PlugletPeer_newStream: Error during writing to returned stream");
return;
}
//TestContext.printLog("PlugletPeer_newStream: All data writen.");
//Result will be check via JavaScript (See checkResult for more details)
}
public static void checkResult(String winName, boolean isTop)
{
if (targetWindow.equals("_top")&&isTop) {
TestContext.registerPASSED("All data was posted in _top window.");
return;
}
if (targetWindow.equals(winName)) {
TestContext.registerPASSED("All data was posted in right window with name: " + winName);
} else {
TestContext.registerFAILED("Data was posted to the wrong window with name: " + winName +
" instead of: " + targetWindow);
}
}
public static void setResult(boolean res,String comment)
{
if(res) {
TestContext.registerPASSED("Result from JavaScript: " + comment);
} else {
TestContext.registerFAILED("Result from JavaScript: " + comment);
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
public void execute(TestContext context)
{
Properties paramProps = null;
PlugletPeer PlugletPeer_obj = null;
if( context == null ) {
TestContext.registerFAILED("ERROR:null context passed in execute(TestContext) " +
"of PlugletPeer_newStream_4");
return;
}
if (context.failedIsRegistered()) {
return;
}
Vector vectorOfParameters = context.getParameters();
PlugletPeer_obj = context.getPlugletPeer();
if( PlugletPeer_obj == null ) {
TestContext.registerFAILED("ERROR:null PlugletPeer passed in execute(TestContext) " +
"of PlugletPeer_newStream_4");
return;
}
targetWindow = (String)vectorOfParameters.elementAt(1);
OutputStream rt = PlugletPeer_obj.newStream((String)vectorOfParameters.elementAt(0),targetWindow);
if ( rt == null ) {
TestContext.registerFAILED("PlugletPeer_newStream(" + (String)vectorOfParameters.elementAt(0) +
"," + targetWindow + ") returns null");
return;
}
TestContext.printLog("DEBUG: PlugletPeer_newStream(" + (String)vectorOfParameters.elementAt(0) +
"," + targetWindow + ") returns \"" + rt + "\" value");
//Prepare to writing to new stream
String inputFileName = context.getProperty("INPUT_FILE");
String testDir = context.getTestDir();
String fileSeparator = System.getProperty("file.separator");
String fullName = testDir + fileSeparator + inputFileName;
if (inputFileName == null) {
TestContext.registerFAILED("Property \"INPUT_FILE\" isn't set. So test can't read input file");
return;
}
FileInputStream fis = null;
File inputFile = new File(fullName);
int dataLength = (int)inputFile.length();
int dataRead = 0;
byte[] buf = new byte[dataLength];
try {
fis = new FileInputStream(inputFile);
} catch (Exception e) {
TestContext.registerFAILED("Can't open file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try{
while(dataRead<dataLength)
{
dataRead += fis.read(buf,dataRead,dataLength);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try {
fis.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close file for post to new stream: " + fullName);
e.printStackTrace();
return;
}
try {
rt.write(buf,0,dataLength);
rt.flush();
rt.close();
} catch(Exception e) {
TestContext.registerFAILED("PlugletPeer_newStream: Error during writing to returned stream");
return;
}
//TestContext.printLog("PlugletPeer_newStream: All data writen.");
//Result will be check via JavaScript (See checkResult for more details)
}
public static void checkResult(String winName, boolean isTop)
{
if (targetWindow.equals("_top")&&isTop) {
TestContext.registerPASSED("All data was posted in _top window.");
return;
}
if (targetWindow.equals(winName)) {
TestContext.registerPASSED("All data was posted in right window with name: " + winName);
} else {
TestContext.registerFAILED("Data was posted to the wrong window with name: " + winName +
" instead of: " + targetWindow);
}
}
public static void setResult(boolean res,String comment)
{
if(res) {
TestContext.registerPASSED("Result from JavaScript: " + comment);
} else {
TestContext.registerFAILED("Result from JavaScript: " + comment);
}
}
/**
*
***********************************************************
* Routine where OS specific checks are made.
*
* @param os OS Name (SunOS/Linus/MacOS/...)
***********************************************************
*
*/
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}
private void osRoutine(String os)
{
if(os == null) return;
os = os.trim();
if(os.compareTo("SunOS") == 0) {}
else if(os.compareTo("Linux") == 0) {}
else if(os.compareTo("Windows") == 0) {}
else if(os.compareTo("MacOS") == 0) {}
else {}
}
}

View File

@@ -20,128 +20,128 @@
*/
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_newStream_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
package org.mozilla.pluglet.test.basic.api;
import java.util.*;
import java.io.*;
import java.net.*;
import org.mozilla.pluglet.test.basic.*;
import org.mozilla.pluglet.mozilla.*;
import org.mozilla.pluglet.*;
public class PlugletPeer_newStream_Iterator implements TestListIterator
{
Vector combstr = new Vector();
int curElement = 0;
Properties testProps = null;
TestContext context = null;
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public PlugletPeer_newStream_Iterator()
{
//Actions moved in initialize(TestContext context)
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
public PlugletPeer_newStream_Iterator()
{
//Actions moved in initialize(TestContext context)
}
/**
*
***********************************************************
* Starting point of application
*
* @param args Array of command line arguments
*
***********************************************************
*/
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
public static void main(String[] args)
{
}
/**
***********************************************************
*
* Initialize Method
*
* This method initialize parameters array and prepare for
* access parameters via nextParams method
*
* @param contex TestContext reference with properties and parameters
* @return nothing
*
***********************************************************
*/
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[2];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is String
result = (Object)(paramValue[0].equals("null") ? null : paramValue[0] );
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is String
result = (Object)(paramValue[1].equals("null") ? null : paramValue[1] );
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}
public boolean initialize(TestContext context)
{
this.context = context;
BufferedReader br = null;
String paramString = new String("");
String fileName = context.getProperty("LST_FILE_NAME");
String separator = System.getProperty("file.separator");
String paramFile = context.getTestDir() + separator + fileName;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(paramFile)));
} catch (Exception e) {
TestContext.registerFAILED("Can't open parameters file: " + paramFile);
return false;
}
try{
while((paramString = br.readLine())!= null)
{
combstr.addElement(paramString);
}
} catch (Exception e) {
TestContext.registerFAILED("Can't read from parameters file: " + paramFile);
return false;
}
try {
br.close();
} catch (Exception e) {
TestContext.registerFAILED("Can't close parameters file: " + paramFile);
return false;
}
return true;
}
public boolean next()
{
String[] paramValue = new String[2];
Vector vectorOfParameters = new Vector();
if (context == null)
{
System.err.println("context not initialized" );
TestContext.registerFAILED("context not initialized");
return false;
}
if(curElement <combstr.size())
{
int i = 0;
int last = 0;
int cur = 0;
String pstr = (String)combstr.elementAt(curElement++);
while((cur = pstr.indexOf(",",last)) != -1) {
paramValue[i] = pstr.substring(last,cur);
paramValue[i] = paramValue[i].trim();
//testProps.setProperty("param" + (new Integer(i)).toString(),pstr.substring(last,cur));
i++;
last = cur +1;
}
//For add last value
paramValue[i] = pstr.substring(last,pstr.length());
paramValue[i] = paramValue[i].trim();
Object result = null;
// Parameter number 0,parameter type is String
result = (Object)(paramValue[0].equals("null") ? null : paramValue[0] );
vectorOfParameters.addElement(result);
// Parameter number 1,parameter type is String
result = (Object)(paramValue[1].equals("null") ? null : paramValue[1] );
vectorOfParameters.addElement(result);
context.setParameters(vectorOfParameters);
return true;
}
return false;
}
}

View File

@@ -1,36 +1,36 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
currentX=window.outerHeight;
currentY=window.outerWidth;
iId = window.setInterval('verifySize()',timeout);
}
function verifySize()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_setWindowSize_9.actionPerformed) {
window.setTimeout('doWork()',1000);
window.clearInterval(iId);
}
}
function doWork()
{
currentX=window.outerHeight;
currentY=window.outerWidth;
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_setWindowSize_9.verifySize(currentX,currentY);
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_setWindowSize test.</blockquote>
<center><EMBED type="application/x-api-pluglet" name="test" width=100 height=100></center>
<blockquote>The test result's will be passed to pluglet by JavaScript</blockquote>
</body>
</hmtl>
<html>
<head>
<script language="JavaScript">
<!--
var iID;
function init(timeout)
{
currentX=window.outerHeight;
currentY=window.outerWidth;
iId = window.setInterval('verifySize()',timeout);
}
function verifySize()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_setWindowSize_9.actionPerformed) {
window.setTimeout('doWork()',1000);
window.clearInterval(iId);
}
}
function doWork()
{
currentX=window.outerHeight;
currentY=window.outerWidth;
Packages.org.mozilla.pluglet.test.basic.api.PlugletPeer_setWindowSize_9.verifySize(currentX,currentY);
}
//-->
</script>
</head>
<body onLoad=init(1000)>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletPeer_setWindowSize test.</blockquote>
<center><EMBED type="application/x-api-pluglet" name="test" width=100 height=100></center>
<blockquote>The test result's will be passed to pluglet by JavaScript</blockquote>
</body>
</hmtl>

View File

@@ -1,7 +1,7 @@
0: NORMAL_WINDOW_SIZE_X, NORMAL_WINDOW_SIZE_Y
1: NORMAL_WINDOW_SIZE_X, 0
2: NORMAL_WINDOW_SIZE_X, Integer.MIN_VALUE
3: NORMAL_WINDOW_SIZE_X, Integer.MAX_VALUE
4: 0, NORMAL_WINDOW_SIZE_Y
5: Integer.MIN_VALUE, NORMAL_WINDOW_SIZE_Y
6: Integer.MAX_VALUE, NORMAL_WINDOW_SIZE_Y
0: NORMAL_WINDOW_SIZE_X, NORMAL_WINDOW_SIZE_Y
1: NORMAL_WINDOW_SIZE_X, 0
2: NORMAL_WINDOW_SIZE_X, Integer.MIN_VALUE
3: NORMAL_WINDOW_SIZE_X, Integer.MAX_VALUE
4: 0, NORMAL_WINDOW_SIZE_Y
5: Integer.MIN_VALUE, NORMAL_WINDOW_SIZE_Y
6: Integer.MAX_VALUE, NORMAL_WINDOW_SIZE_Y

Some files were not shown because too many files have changed in this diff Show More