Added README and BWTest.lst

Updated some test cases


git-svn-id: svn://10.0.0.236/trunk@66984 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rpallath%eng.sun.com
2000-04-24 18:25:27 +00:00
parent 23edb20bda
commit 2fd5307c2d
122 changed files with 928 additions and 1083 deletions

View File

@@ -0,0 +1,111 @@
To build and test the Pluglet tests
======================================
Requirements:
* current mozilla built tree
* JDK1.3 or JDK1.2 if you are not using OJI
* Perl 5 perl.exe must be in your path
* built org.mozilla.pluglet java classes (See NOTE)
========================================================================
Win32 Directions:
========================================================================
How To Build and Run :
* make sure the following environment var are set
- JDKHOME is set to your jdk installation directory,
ie SET JDKHOME=C:\jdk1.3.
- MOZILLA_FIVE_HOME
- add C:\jdk1.3\jre\lib\ext to your classpath.
* Edit <TEST_TOP_DIR>/config/CommonProperties file
- Comment /uncomment the appropriate FSEP variable
- Modify HTML_ROOT .Set it to
The URL of directory where the htmls of tests are placed
eg: http://machine:port/<some-test-dir>
* Edit <TEST_TOP_DIR>/config/set_env.bat
- Modify HTML_ROOT_DIR var
eg: set HTML_ROOT_DIR=c:\some-webserver\public_html\<some-test-dir>
- run set_env.bat
* Edit <TEST_TOP_DIR>/config/SecurityTests.keys
- Replace every occurance of Host sirius with your Host name
and port with your active port number.
* cd <TEST_TOP_DIR>/src/org/mozilla/pluglet/test/basic
type nmake -f makefile.win
* Once build is successful
run this using the perl script
perl autorun.pl -f BWTest.lst.ORIG
* Results of the tests are recorded under <TEST_TOP_DIR>/log/
=========================================================================
Unix Directions:
=========================================================================
How To Build and Run :
* make sure the following environment var are set
- JDKHOME is set to your jdk installation directory,
ie setenv JDKHOME /usr/local/java/jdk1.3/solaris
- MOZILLA_FIVE_HOME
ie setenv MOZILLA_FIVE_HOME <..>/mozilla/dist/bin
-LD_LIBRARY_PATH is set to
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${MOZILLA_FIVE_HOME}:${JDKHOME}/jre/lib/sparc/native_threads:${JDKHOME}/jre/lib/sparc/classic:${JDKHOME}/jre/lib/sparc
-CLASSPATH is set to
setenv CLASSPATH ${CLASSPATH}:<..>/mozilla/dist/classes
- HTML_ROOT_DIR is set to
setenv HTML_ROOT_DIR /<webserver-rootdir>/public_html/<some-test-dir>
* Edit <TEST_TOP_DIR>/config/CommonProperties file
- Comment /uncomment the appropriate FSEP variable
- Modify HTML_ROOT .Set it to
The URL of directory where the htmls of tests are placed
eg: http://machine:port/<some-test-dir>
* cd <TEST_TOP_DIR>/src/org/mozilla/pluglet/test/basic
type make .. and hope for the best
* Once build is successful
run this using the perl script
perl autorun.pl -f BWTest.lst
* Results of the tests are recorded under <TEST_TOP_DIR>/log/
NOTE
=====
Plugelts must be successfully built before these tests can be run.
To build Pluglets follow instructions under /mozilla/java/plugins/README

View File

@@ -1,18 +1,23 @@
# The timeouts of test execution
## The timeouts of test execution
DELAY=60
DELAY_OF_CYCLE=5
DELAY_INTERNAL=40
# The names of files for writing log and result by test
## The names of files for writing log and result by test
LOG_FILE=PlugletTest.log
RESULT_FILE=PlugletTest.res
#File separator (Used to specify PLUGLET property)
FSEP=/
# The root directory of the this pluglet API test suite
## File separator property, used to specify PLUGLET variable
## Under Win32
FSEP=\
## Under Unix
#FSEP=/
## The root directory of the this pluglet API test suite
TEST_TOP_DIR=C:\sync
# The URL of directory where the htmls of tests are placed
# The path to this directory should be pointed in set_env.bat to be used
# during building
## The URL of directory where the htmls of tests are placed
## The path to this directory should be pointed in set_env.bat to be used
## during building
HTML_ROOT=file:/c:/sync/build/htroot

View File

@@ -35,7 +35,7 @@ PrintTest.mustPass=true
# ReadFileTest.java test properties
#
ReadFileTest.mustPass=true
ReadFileTest.FileName=foo
ReadFileTest.FileName=TestProperties
#
# RemoteConnectTest.java test properties

View File

@@ -0,0 +1,95 @@
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/security/DeleteFileTest
basic/security/GetClipboardTest
basic/security/GetSysPropsTest
basic/security/OpenWinTest
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/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/SecTestRunLoadLib
basic/security/automation/SecTestSetSecMgr
basic/security/automation/SecTestSocket
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/api/PlugletPeer_getMIMEType
basic/api/PlugletPeer_getMode
basic/api/PlugletPeer_getValue:0
basic/api/PlugletPeer_getValue:1
basic/api/PlugletPeer_getValue:2
basic/api/PlugletPeer_getTagInfo
basic/api/PlugletTagInfo_getAttribute:0
basic/api/PlugletTagInfo_getAttribute:1
basic/api/PlugletTagInfo_getAttribute:2
basic/api/PlugletTagInfo_getAttribute:3
basic/api/PlugletTagInfo_getAttributes
basic/api/PlugletTagInfo2_getParameter:0
basic/api/PlugletTagInfo2_getParameter:1
basic/api/PlugletTagInfo2_getParameter:3
basic/api/PlugletTagInfo2_getParameters
basic/api/PlugletTagInfo2_getParameters_1
basic/api/PlugletTagInfo2_getAttribute:0
basic/api/PlugletTagInfo2_getAttribute:1
basic/api/PlugletTagInfo2_getAttribute:2
basic/api/PlugletTagInfo2_getAttribute:3
basic/api/PlugletTagInfo2_getAttributes
basic/api/PlugletTagInfo2_getBorderHorizSpace
basic/api/PlugletTagInfo2_getBorderHorizSpace_1
basic/api/PlugletTagInfo2_getBorderVertSpace
basic/api/PlugletTagInfo2_getBorderVertSpace_1
basic/api/PlugletTagInfo2_getDocumentBase
basic/api/PlugletTagInfo2_getHeight
basic/api/PlugletTagInfo2_getHeight_1
basic/api/PlugletTagInfo2_getTagType
basic/api/PlugletTagInfo2_getTagType_1
basic/api/PlugletTagInfo2_getWidth
basic/api/PlugletTagInfo2_getWidth_1

View File

@@ -30,9 +30,9 @@ TEST_DIRS=api params security returns scenario
all: basic tests
tests:
@if [ -z $(HTML_ROOT_DIR) ] ; then \
@if [ "aa$(HTML_ROOT_DIR)" = "aa" ] ; then \
echo "======================================"; \
echo "Error. You MUST specify \$HTML_ROOT_DIR"; \
echo "Error. You MUST specify HTML_ROOT_DIR"; \
echo "variable for make in test dirs."; \
echo "======================================"; \
exit -1; \
@@ -45,7 +45,7 @@ basic: classes TestLoaderPluglet.jar
classes:
@echo "Building .basic classes ..."
@$(JAVAC) -d $(BUILD_DIR_CLASSES) *.java
@$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR_CLASSES) *.java
@echo done
#$(JDKHOME)/bin/jar cfm

View File

@@ -31,7 +31,7 @@ API_HTML_ROOT_DIR=$(HTML_ROOT_DIR)/api
JSRC= *.java
JAVAC=$(JDKHOME)/bin/javac
JAVA=$(JDKHOME)/bin/java
CLASSPATH=$(MOZILLA_FIVE_HOME)/../classes:$(BUILD_DIR_CLASSES):$$(CLASSPATH)
CLASSPATH=$(MOZILLA_FIVE_HOME)/../classes:$(BUILD_DIR_CLASSES)
#All tests list
#PlugletManager_getValue was excluded from test list, method removed
@@ -50,7 +50,11 @@ TESTS = PlugletPeer_getMIMEType \
PlugletStreamInfo_getURL \
PlugletStreamInfo_isSeekable \
PlugletStreamInfo_requestRead \
PlugletTagInfo2_getAlignment \
PlugletTagInfo2_getAlignment_left \
PlugletTagInfo2_getAlignment_right \
PlugletTagInfo2_getAlignment_top \
PlugletTagInfo2_getAlignment_bottom \
PlugletTagInfo2_getAlignment_middle \
PlugletTagInfo_getAttribute \
PlugletTagInfo_getAttributes \
PlugletTagInfo2_getParameter \
@@ -83,7 +87,7 @@ default: classes tests test_pluglet
classes:
@echo Compile classes ..
@$(JAVAC) -d $(BUILD_DIR_CLASSES) Pluglet*.java
@$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR_CLASSES) Pluglet*.java
test_pluglet:
@mkdir -p $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/api

View File

@@ -1,24 +1,7 @@
<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)>
<body>
<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>

View File

@@ -4,5 +4,5 @@ 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
EXPECTED_VALUE=application/x-api-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

@@ -84,22 +84,14 @@ public class PlugletPeer_getMIMEType_0 implements Test
return;
}
MIMEType = PlugletPeer_obj.getMIMEType();
actionPerformed = true;
System.err.println("DEBUG: PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
String expectedType = context.getProperty("EXPECTED_VALUE");
if (expectedType.equals(MIMEType)) {
TestContext.registerPASSED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType + "\" value");
} else {
TestContext.registerFAILED("PlugletPeer_obj.getMIMEType returns \"" + MIMEType +
"\" value, different from \"" + expectedType +"\"");
}
}
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 +"\"");
}
}
/**
*
***********************************************************

View File

@@ -1,36 +1,7 @@
<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)>
<body>
<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>

View File

@@ -3,3 +3,5 @@ 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
TEST_ATTRIBUTE_NAME=type
TEST_ATTRIBUTE_VALUE=application/x-api-pluglet

View File

@@ -32,7 +32,6 @@ 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;
/**
*
@@ -80,41 +79,27 @@ public class PlugletPeer_getTagInfo_0 implements Test
}
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);
String attrName = context.getProperty("TEST_ATTRIBUTE_NAME");
String expectedAttrValue = context.getProperty("TEST_ATTRIBUTE_VALUE");
String attrValue = info.getAttribute(attrName);
if (attrValue == null) {
TestContext.registerFAILED("null value returned for attribute \"" + TEST_ATTRIBUTE_NAME +
TestContext.registerFAILED("null value returned for attribute \"" + attrName +
"\" 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)) {
if (attrValue.equals(expectedAttrValue)) {
TestContext.registerPASSED("Good TagInfo object returned");
return;
} else {
TestContext.registerFAILED("Strange TagInfo object returned, " + TEST_ATTRIBUTE_NAME + "=\"" +
attrValue + "\" instead of \"" + goodAttrValue + "\"");
TestContext.registerFAILED("Strange TagInfo object returned, " + attrName + "=\"" +
attrValue + "\" instead of \"" + expectedAttrValue + "\"");
return;
}
}
/**
*

View File

@@ -1,25 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var contentType = "image/gif"; //Content type of file, used as src.
function init(timeout)
{
iId = window.setInterval('verifyContentType()',timeout);
}
function verifyContentType()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getContentType_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getContentType_0.verifyContentType(contentType);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletStreamInfo_getContentType test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" src=TestImage.gif width=100 height=100>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -3,5 +3,5 @@ RUN_STAGES=PLUGLET_STREAM_LISTENER_ON_START_BINDING
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getContentType_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getContentType_Iterator
TEST_HTML=api/PlugletStreamInfo_getContentType/PlugletStreamInfo_getContentType.html
#STREAM_CONTENT_TYPE=image/gif
EXPECTED_VALUE=image/gif
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

@@ -88,21 +88,13 @@ public class PlugletStreamInfo_getContentType_0 implements Test
return;
}
contentType = PlugletStreamInfo_obj.getContentType();
actionPerformed = true;
System.err.println("DEBUG: PlugletStreamInfo_getContentType returns \"" + contentType + "\" value");
}
public static void verifyContentType(String type)
{
if (contentType == null) {
TestContext.registerFAILED("null contentType value returned.");
return;
}
if (type.equals(contentType)) {
TestContext.registerPASSED("PlugletStreamInfo_getContentType returns \"" + contentType + "\" value");
} else {
TestContext.registerFAILED("PlugletStreamInfo_getContentType returns \"" + contentType +
"\" value instead of \"" + type + "\"");
}
String expectedType = context.getProperty("EXPECTED_VALUE");
if (expectedType.equals(contentType)) {
TestContext.registerPASSED("PlugletStreamInfo_getContentType returns \"" + contentType + "\" value");
} else {
TestContext.registerFAILED("PlugletStreamInfo_getContentType returns \"" + contentType +
"\" value instead of \"" + expectedType + "\"");
}
}
/**
*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -1,29 +1,6 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var name = "TestImage.gif"; //Name of file, used as src.
var src = "";
function init(timeout)
{
var loc = window.location.href;
src = loc.replace(/PlugletStreamInfo_getLength.html/,name); //src contains full URL, used in src
iId = window.setInterval('verifySrcLength()',timeout);
}
function verifySrcLength()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getLength_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getLength_0.verifySrcLength(src);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletStreamInfo_getLength test.</blockquote>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -4,3 +4,4 @@ TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getLength_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getLength_Iterator
TEST_HTML=api/PlugletStreamInfo_getLength/PlugletStreamInfo_getLength.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
SRC_URL=api/PlugletStreamInfo_getLength/TestImage.gif

View File

@@ -88,8 +88,32 @@ public class PlugletStreamInfo_getLength_0 implements Test
return;
}
length = PlugletStreamInfo_obj.getLength();
actionPerformed = true;
System.err.println("DEBUG: PlugletStreamInfo_getLength returns \"" + length + "\" value");
try {
URL sURL = new URL(context.getProperty("HTML_ROOT") + "/" + context.getProperty("SRC_URL"));
//Workaround for starnge JDK1.3.0G(Win32) behaviour when proceed
//url with file:/// and different drive labels.
if (sURL.getProtocol().equals("file")) {
String file = sURL.getFile();
int index = file.indexOf("|/");
if (index != -1) {
file = file.charAt(index - 1) + ":" + file.substring(index+1);
sURL = new URL("file",null,-1,file);
}
}
int goodLength = sURL.openConnection().getContentLength();
if (length!=goodLength) {
TestContext.registerFAILED("PlugletStreamInfo_getLength returns \"" + length +
"\" value instead of \"" + goodLength + "\"");
return;
} else {
TestContext.registerPASSED("PlugletStreamInfo_getLength returns \"" + length +
"\" value ");
return;
}
} catch(Exception e) {
e.printStackTrace();
TestContext.registerFAILED("Exception " + e );
}
}
public static void verifySrcLength(String src)
{

View File

@@ -1,29 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var name = "TestImage.gif"; //Name of file, used as src.
var src = "";
function init(timeout)
{
var loc = window.location.href;
src = loc.replace(/PlugletStreamInfo_getURL.html/,name); //src contains full URL, used in src
iId = window.setInterval('verifyURL()',timeout);
}
function verifyURL()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getURL_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getURL_0.verifyUrl(src);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet with PlugletStreamInfo_getURL test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" src=TestImage.gif width=100 height=100>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -2,5 +2,5 @@ RUN_STAGES=PLUGLET_STREAM_LISTENER_ON_START_BINDING
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getURL_0
ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletStreamInfo_getURL_Iterator
TEST_HTML=api/PlugletStreamInfo_getURL/PlugletStreamInfo_getURL.html
#USED_SRC_FILE=PlugletStreamInfo_getURL/TestImage.gif
EXPECTED_VALUE=api/PlugletStreamInfo_getURL/TestImage.gif
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

@@ -87,29 +87,22 @@ public class PlugletStreamInfo_getURL_0 implements Test
" of PlugletStreamInfo_getURL_0");
return;
}
srcURL = PlugletStreamInfo_obj.getURL();
actionPerformed = true;
URL srcURL = null;
URL expectedURL = null;
try {
srcURL = new URL(PlugletStreamInfo_obj.getURL());
expectedURL= new URL(context.getProperty("HTML_ROOT") + "/" + context.getProperty("EXPECTED_VALUE"));
} catch (Exception e) {
TestContext.registerFAILED("Exception during compiling URLs: " + e);
return;
}
if (srcURL.equals(expectedURL)) {
TestContext.registerPASSED("Good value " + srcURL + " returned");
return;
} else {
TestContext.registerFAILED("Value " + srcURL + " returned instead of " + expectedURL);
}
}
public static void verifyUrl(String src)
{
if (srcURL == null) {
TestContext.registerFAILED("null value returned by getURL method");
return;
}
try {
URL sURL = new URL(srcURL);
if( sURL.equals(new URL(src)) ) {
TestContext.registerPASSED("PlugletStreamInfo_getURL returns \"" + srcURL + "\" value");
} else {
TestContext.registerFAILED("PlugletStreamInfo_getURL returns \"" + srcURL +
"\" value istead of \"" + src + "\"");
}
} catch (Exception e) {
TestContext.printLog("Exception during compile URL's for test: " + e);
TestContext.registerFAILED("PlugletStreamInfo_getURL returns \"" + srcURL + "\" value");
e.printStackTrace();
}
}
/**
*
***********************************************************

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -84,8 +84,24 @@ public class PlugletTagInfo2_getAlignment_0 implements Test
return;
}
String rt = PlugletTagInfo2_obj.getAlignment();
System.err.println("PlugletTagInfo2_getAlignment returns \"" + rt + "\" value");
//String rt = PlugletTagInfo2_obj.getAlignment();
//System.err.println("PlugletTagInfo2_getAlignment returns \"" + rt + "\" value");
String expected_align = null;
try {
expected_align = (new String(context.getProperty("EXPECTED_VALUE")));
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
String align = PlugletTagInfo2_obj.getAlignment();
if (expected_align.equalsIgnoreCase(align)) {
TestContext.registerPASSED("PlugletTagInfo2_getAlignment returns right value \"" + align + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getAlignment returns value \"" + align +
"\" instead of \"" + expected_align + "\"");
}
}
/**

View File

@@ -1,36 +1,7 @@
<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 ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttribute_2.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttribute_2.verifyAttribute(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getAttribute test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>

View File

@@ -4,3 +4,4 @@ TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttribute_2
TEST_HTML=api/PlugletTagInfo2_getAttribute/PlugletTagInfo2_getAttribute.html
LST_FILE_NAME=PlugletTagInfo2_getAttribute.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
ALL_ATTRIBUTES=type\=application/x-api-pluglet\nname\=test\nwidth\=100\nheight\=100

View File

@@ -88,9 +88,9 @@ public class PlugletTagInfo2_getAttribute_2 implements Test
}
attrName = (String)vectorOfParameters.elementAt(0);
attrVal = PlugletTagInfo2_obj.getAttribute(attrName);
actionPerformed = true;
String allAttributes = context.getProperty("ALL_ATTRIBUTES");
System.err.println("PlugletTagInfo2_getAttribute(" + attrName + ") returns \"" + attrVal + "\" value");
verifyAttribute(allAttributes);
}
public static void verifyAttribute(String attrString)

View File

@@ -1,37 +1,7 @@
<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('verifyAttrs()',timeout);
}
function verifyAttrs()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttributes_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttributes_0.verifyAttributes(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getAttributes test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttributes_
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getAttributes_0
TEST_HTML=api/PlugletTagInfo2_getAttributes/PlugletTagInfo2_getAttributes.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
ALL_ATTRIBUTES=type\=application/x-api-pluglet\nname\=test\nwidth\=100\nheight\=100

View File

@@ -86,10 +86,11 @@ public class PlugletTagInfo2_getAttributes_0 implements Test
}
attrsForVerify = PlugletTagInfo2_obj.getAttributes();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getAttributes returns \"" + attrsForVerify + "\" value");
String allAttributes = context.getProperty("ALL_ATTRIBUTES");
verifyAttributes(allAttributes);
}
public static void verifyAttributes(String attrString)
private void verifyAttributes(String attrString)
{
Properties attr = new Properties();
try {

View File

@@ -1,27 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var hspace = 0;//default value, hspace isn't set
function init(timeout)
{
iId = window.setInterval('verifyHSpace()',timeout);
}
function verifyHSpace()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0.verifyHSpace(hspace);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getBorderHorizSpace test.
EMBED tag hasn't hspace attribute, so default value 0 should be returned.</blockquote>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHoriz
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0
TEST_HTML=api/PlugletTagInfo2_getBorderHorizSpace/PlugletTagInfo2_getBorderHorizSpace.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=0

View File

@@ -85,19 +85,20 @@ public class PlugletTagInfo2_getBorderHorizSpace_0 implements Test
TestContext.registerFAILED("Instance of PlugletTagInfo instead of PlugletTagInfo2 returned");
return;
}
int expected_HSpace = -1;
try {
expected_HSpace = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
HSpace = PlugletTagInfo2_obj.getBorderHorizSpace();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getBorderHorizSpace returns \"" + HSpace + "\" value");
}
public static void verifyHSpace(int hspace) {
if (hspace == HSpace) {
TestContext.registerPASSED("Good value \"" + HSpace +
"\" was returned by PlugletTagInfo2_getBorderHorizSpace");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getBorderHorizSpace returns \"" + HSpace + "\" value " +
"instead of \"" + hspace + "\"");
}
if (expected_HSpace == HSpace) {
TestContext.registerPASSED("PlugletTagInfo2_getBorderHorizSpace returns right value \"" + HSpace + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getBorderHorizSpace returns value \"" + HSpace +
"\" instead of \"" + expected_HSpace + "\"");
}
}
/**
*

View File

@@ -1,32 +1,11 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var hspace = 11;//the value of hspace attribute.
function init(timeout)
{
iId = window.setInterval('verifyHSpace()',timeout);
}
function verifyHSpace()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0.verifyHSpace(hspace);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getBorderHorizSpace test.
EMBED tag has a hspace attribute, equals to 11.This value will be transfered
to test pluglet via Java Script.
EMBED tag has a hspace attribute, equals to 11.
</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100 hspace=11>
</body>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHoriz
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderHorizSpace_0
TEST_HTML=api/PlugletTagInfo2_getBorderHorizSpace_1/PlugletTagInfo2_getBorderHorizSpace.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=11

View File

@@ -1,27 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var VSpace = 0;//the default value.
function init(timeout)
{
iId = window.setInterval('verifyVSpace()',timeout);
}
function verifyVSpace()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0.verifyVSpace(VSpace);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getBorderVertSpace test.
The EMBED tag hasn't vspace attribute so 0 should be returned</blockquote>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertS
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0
TEST_HTML=api/PlugletTagInfo2_getBorderVertSpace/PlugletTagInfo2_getBorderVertSpace.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=0

View File

@@ -84,19 +84,20 @@ public class PlugletTagInfo2_getBorderVertSpace_0 implements Test
"of PlugletTagInfo2 returned");
return;
}
int expected_VSpace = -1;
try {
expected_VSpace = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();;
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
VSpace = PlugletTagInfo2_obj.getBorderVertSpace();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getBorderVertSpace returns \"" + VSpace + "\" value");
}
public static void verifyVSpace(int vspace) {
if (vspace == VSpace) {
TestContext.registerPASSED("Good value \"" + VSpace +
"\" was returned by PlugletTagInfo2_getBorderVertSpace");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getBorderVertSpace returns \"" + VSpace + "\" value " +
"instead of \"" + vspace + "\"");
}
if (expected_VSpace == VSpace) {
TestContext.registerPASSED("PlugletTagInfo2_getBorderVertSpace returns right value \"" + VSpace + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getBorderVertSpace returns value \"" + VSpace +
"\" instead of \"" + expected_VSpace + "\"");
}
}
/**
*

View File

@@ -1,31 +1,10 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var VSpace = 11;//the value of vspace attribute.
function init(timeout)
{
iId = window.setInterval('verifyVSpace()',timeout);
}
function verifyVSpace()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0.verifyVSpace(VSpace);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getBorderVertSpace test.
The EMBED's vspace attribute set to 11 and this value will be passed to
pluglet via JavaScript.
The EMBED's vspace attribute set to 11.
</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100 vspace=11>
</body>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertS
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getBorderVertSpace_0
TEST_HTML=api/PlugletTagInfo2_getBorderVertSpace_1/PlugletTagInfo2_getBorderVertSpace.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=11

View File

@@ -1,28 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var curURL = "";
function init(timeout)
{
curURL = window.location.href;
iId = window.setInterval('verifyDocBase()',timeout);
}
function verifyDocBase()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getDocumentBase_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getDocumentBase_0.verifyDocBase(curURL);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getDocumentBase test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getDocumentBas
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getDocumentBase_0
TEST_HTML=api/PlugletTagInfo2_getDocumentBase/PlugletTagInfo2_getDocumentBase.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=api/PlugletTagInfo2_getDocumentBase/PlugletTagInfo2_getDocumentBase.html

View File

@@ -85,27 +85,22 @@ public class PlugletTagInfo2_getDocumentBase_0 implements Test
return;
}
docBase = PlugletTagInfo2_obj.getDocumentBase();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getDocumentBase returns \"" + docBase + "\" value");
}
public static void verifyDocBase(String curDocBase)
{
URL realBase = null;
URL base = null;
try {
realBase = new URL(curDocBase);
base = new URL(docBase);
} catch (Exception e) {
TestContext.registerFAILED("Exception during compiling URLs: " + e);
return;
}
if (realBase.equals(base)) {
TestContext.registerPASSED("Good value " + docBase + " returned");
return;
} else {
TestContext.registerFAILED("Value " + docBase + " returned instead of " + curDocBase);
}
String expectedBase = context.getProperty("HTML_ROOT") + "/" + context.getProperty("EXPECTED_VALUE");
URL realBase = null;
URL base = null;
try {
realBase = new URL(expectedBase);
base = new URL(docBase);
} catch (Exception e) {
TestContext.registerFAILED("Exception during compiling URLs: " + e);
return;
}
if (realBase.equals(base)) {
TestContext.registerPASSED("Good value " + docBase + " returned");
return;
} else {
TestContext.registerFAILED("Value " + docBase + " returned instead of " + expectedBase);
}
}
/**
*

View File

@@ -1,29 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var height = 0;//the default value
function init(timeout)
{
iId = window.setInterval('verifyHeight()',timeout);
}
function verifyHeight()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0.verifyHeight(height);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getHeight test.
EMBED tag hasn't height attribute so default value should be returned</blockquote>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_Iter
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0
TEST_HTML=api/PlugletTagInfo2_getHeight/PlugletTagInfo2_getHeight.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=0

View File

@@ -84,21 +84,21 @@ public class PlugletTagInfo2_getHeight_0 implements Test
TestContext.registerFAILED("Instance of PlugletTagInfo instead of PlugletTagInfo2 returned");
return;
}
int expected_height = -1;
try {
expected_height = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
height = PlugletTagInfo2_obj.getHeight();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getHeight returns \"" + height + "\" value");
}
public static void verifyHeight(int realHeight)
{
if (height == realHeight) {
TestContext.registerPASSED("Good value \"" + height +
"\" was returned by PlugletTagInfo2_getHeight");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getHeight returns \"" + height + "\" value " +
"instead of \"" + realHeight + "\"");
}
if (expected_height == height) {
TestContext.registerPASSED("PlugletTagInfo2_getHeight returns right value \"" + height + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getHeight returns value \"" + height +
"\" instead of \"" + expected_height + "\"");
}
}
/**
*

View File

@@ -1,31 +1,11 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var height = 111;//the value of height attribute
function init(timeout)
{
iId = window.setInterval('verifyHeight()',timeout);
}
function verifyHeight()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0.verifyHeight(height);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getHeight test.
Attribute "height" of EMBED tag is set to 111,
this value will be passed to pluglet via JavaScript
Attribute "height" of EMBED tag is set to 111.
</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=111>
</body>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_Iter
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getHeight_0
TEST_HTML=api/PlugletTagInfo2_getHeight_1/PlugletTagInfo2_getHeight.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=111

View File

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

View File

@@ -4,3 +4,4 @@ TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameter_2
TEST_HTML=api/PlugletTagInfo2_getParameter/PlugletTagInfo2_getParameter.html
LST_FILE_NAME=PlugletTagInfo2_getParameter.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
ALL_PARAMETERS=Description=Browser\ side\ Pluglet\ API\ tests\nHTML_CREATION_DATE=Feb-01-2000\nTestID=basic/api/PlugletTagInfo2_getParameter

View File

@@ -87,10 +87,11 @@ public class PlugletTagInfo2_getParameter_2 implements Test
}
paramName = (String)vectorOfParameters.elementAt(0);
paramVal = PlugletTagInfo2_obj.getParameter(paramName);
actionPerformed = true;
System.err.println("PlugletTagInfo2_getParameter(" + paramName + ") returns \"" + paramVal + "\" value");
String allParameters = context.getProperty("ALL_PARAMETERS");
verifyParameter(allParameters);
}
public static void verifyParameter(String paramString)
private void verifyParameter(String paramString)
{
Properties paramReal = new Properties();
if (paramName == null) {

View File

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

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_0
TEST_HTML=api/PlugletTagInfo2_getParameters/PlugletTagInfo2_getParameters.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
ALL_PARAMETERS=Description=Browser\ side\ Pluglet\ API\ tests\nHTML_CREATION_DATE=Feb-01-2000\nTestID=basic/api/PlugletTagInfo2_getParameters

View File

@@ -84,10 +84,11 @@ public class PlugletTagInfo2_getParameters_0 implements Test
return;
}
attrsForVerify = PlugletTagInfo2_obj.getParameters();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getParameters returns \"" + attrsForVerify + "\" value");
String allParameters = context.getProperty("ALL_PARAMETERS");
verifyParameters(allParameters);
}
public static void verifyParameters(String attrString)
private void verifyParameters(String attrString)
{
if(attrString.equals("")) { //No parameters set
if(attrsForVerify.isEmpty()) {

View File

@@ -1,27 +1,6 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var allParameters="";
function init(timeout)
{
iId = window.setInterval('verifyParams()',timeout);
}
function verifyParams()
{
java.lang.System.err.println("Verify ..(With empty params)");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_0.verifyParameters(allParameters);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getParameters test.

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getParameters_0
TEST_HTML=api/PlugletTagInfo2_getParameters_1/PlugletTagInfo2_getParameters.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
ALL_PARAMETERS=

View File

@@ -1,27 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var type = 'EMBED';
function init(timeout)
{
iId = window.setInterval('verifyType()',timeout);
}
function verifyType()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0.verifyType(type);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getTagType test.

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_Ite
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0
TEST_HTML=api/PlugletTagInfo2_getTagType/PlugletTagInfo2_getTagType.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=EMBED

View File

@@ -84,23 +84,20 @@ public class PlugletTagInfo2_getTagType_0 implements Test
TestContext.registerFAILED("Instance of PlugletTagInfo instead of PlugletTagInfo2 returned");
return;
}
String expected_type = null;
try {
expected_type = context.getProperty("EXPECTED_VALUE");
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
type = PlugletTagInfo2_obj.getTagType();
actionPerformed = true;
System.err.println("PlugletTagInfo2_getTagType returns \"" + type + "\" value");
}
public static void verifyType(String realType) {
if (type == null) {
TestContext.registerFAILED("PlugletTagInfo2_getTagType returns null value ");
return;
}
if (type.equals(realType)) {
TestContext.registerPASSED("Good value \"" + type +
"\" was returned by PlugletTagInfo2_getTagType");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getTagType returns \"" + type + "\" value " +
"instead of \"" + realType + "\"");
}
if (expected_type.equals(type)) {
TestContext.registerPASSED("PlugletTagInfo2_getTagType returns right value \"" + type + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getTagType returns value \"" + type +
"\" instead of \"" + expected_type + "\"");
}
}
/**
*

View File

@@ -1,26 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var type = 'OBJECT';
function init(timeout)
{
iId = window.setInterval('verifyType()',timeout);
}
function verifyType()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0.verifyType(type);
window.clearInterval(iId);
}
}
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getTagType test.

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_Ite
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getTagType_0
TEST_HTML=api/PlugletTagInfo2_getTagType_1/PlugletTagInfo2_getTagType.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=OBJECT

View File

@@ -1,11 +1,11 @@
<html>
<body>
<center><H1>Depth 0</H1></center>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
<blockquote>This window contains a pluglet PlugletTagInfo2_getUniqueID test.</blockquote>
<EMBED type="application/x-id-pluglet" name="I1" width=100 height=100>
<EMBED type="application/x-id-pluglet" name="I2" width=100 height=100>
<EMBED type="application/x-id-pluglet" name="I3" width=100 height=100>
<blockquote>This window contains a pluglet PlugletTagInfo2_getUniqueID test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>
<blockquote>And 3 test pluglets, just for verify uniqueID</blockquote>
</body>
</hmtl>

View File

@@ -1,26 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var width = 0;//the default value of width attribute
function init(timeout)
{
iId = window.setInterval('verifyWidth()',timeout);
}
function verifyWidth()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0.verifyWidth(width);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo2_getWidth test.
The EMBED tag hasn't width attribute, so default value should be returned.

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_Itera
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0
TEST_HTML=api/PlugletTagInfo2_getWidth/PlugletTagInfo2_getWidth.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=0

View File

@@ -31,8 +31,6 @@ import org.mozilla.pluglet.*;
public class PlugletTagInfo2_getWidth_0 implements Test
{
private static int width = -1;
public static boolean actionPerformed = false;
/**
*
***********************************************************
@@ -85,21 +83,22 @@ public class PlugletTagInfo2_getWidth_0 implements Test
TestContext.registerFAILED("Instance of PlugletTagInfo instead of PlugletTagInfo2 returned");
return;
}
width = PlugletTagInfo2_obj.getWidth();
actionPerformed = true;
int expected_width = -1;
try {
expected_width = (new Integer(context.getProperty("EXPECTED_VALUE"))).intValue();
} catch (Exception e) {
TestContext.registerFAILED("Exception during parsing property EXPECTED_VALUE: " + e);
return;
}
int width = PlugletTagInfo2_obj.getWidth();
System.err.println("PlugletTagInfo2_getWidth returns \"" + width + "\" value");
if (expected_width == width) {
TestContext.registerPASSED("PlugletTagInfo2_getWidth returns right value \"" + width + "\"");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getWidth returns value \"" + width +
"\" instead of \"" + expected_width + "\"");
}
}
public static void verifyWidth(int realWidth) {
if (width == realWidth) {
TestContext.registerPASSED("Good value \"" + width +
"\" was returned by PlugletTagInfo2_getWidth");
} else {
TestContext.registerFAILED("PlugletTagInfo2_getWidth returns \"" + width + "\" value " +
"instead of \"" + realWidth + "\"");
}
}
/**
*
***********************************************************

View File

@@ -1,26 +1,7 @@
<html>
<head>
<script language="JavaScript">
<!--
var iID;
var width = 111;//the value of width attribute
function init(timeout)
{
iId = window.setInterval('verifyWidth()',timeout);
}
function verifyWidth()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0.verifyWidth(width);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>
This window contains a pluglet PlugletTagInfo2_getWidth test.

View File

@@ -3,3 +3,5 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_Itera
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo2_getWidth_0
TEST_HTML=api/PlugletTagInfo2_getWidth_1/PlugletTagInfo2_getWidth.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
EXPECTED_VALUE=111

View File

@@ -1,37 +1,7 @@
<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 ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttribute_2.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttribute_2.verifyAttribute(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo_getAttribute test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>

View File

@@ -4,3 +4,4 @@ TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttribute_2
TEST_HTML=api/PlugletTagInfo_getAttribute/PlugletTagInfo_getAttribute.html
LST_FILE_NAME=PlugletTagInfo_getAttribute.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
ALL_ATTRIBUTES=type\=application/x-api-pluglet\nname\=test\nwidth\=100\nheight\=100

View File

@@ -80,10 +80,11 @@ public class PlugletTagInfo_getAttribute_2 implements Test
PlugletTagInfo PlugletTagInfo_obj = context.getPlugletPeer().getTagInfo();
attrName = (String)vectorOfParameters.elementAt(0);
attrVal = PlugletTagInfo_obj.getAttribute(attrName);
actionPerformed = true;
String allAttributes = context.getProperty("ALL_ATTRIBUTES");
System.err.println("PlugletTagInfo_getAttribute(" + attrName + ") returns \"" + attrVal + "\" value");
verifyAttribute(allAttributes);
}
public static void verifyAttribute(String attrString)
private void verifyAttribute(String attrString)
{
Properties attrReal = new Properties();
if (attrName == null) {

View File

@@ -1,37 +1,7 @@
<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('verifyAttrs()',timeout);
}
function verifyAttrs()
{
java.lang.System.err.println("Verify ..");
if (Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttributes_0.actionPerformed) {
Packages.org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttributes_0.verifyAttributes(allAttributes);
window.clearInterval(iId);
}
}
//-->
</script>
</head>
<body onLoad="init(1000)">
<body>
<center><H1>Depth 0</H1></center>
<blockquote>This window contains a pluglet PlugletTagInfo_getAttributes test.</blockquote>
<EMBED type="application/x-api-pluglet" name="test" width=100 height=100>

View File

@@ -3,3 +3,4 @@ ITERATOR_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttributes_I
TEST_CLASS=org.mozilla.pluglet.test.basic.api.PlugletTagInfo_getAttributes_0
TEST_HTML=api/PlugletTagInfo_getAttributes/PlugletTagInfo_getAttributes.html
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>api<FSEP>TestAPIPluglet.jar
ALL_ATTRIBUTES=type\=application/x-api-pluglet\nname\=test\nwidth\=100\nheight\=100

View File

@@ -77,8 +77,9 @@ public class PlugletTagInfo_getAttributes_0 implements Test
Vector vectorOfParameters = context.getParameters();
PlugletTagInfo PlugletTagInfo_obj = context.getPlugletPeer().getTagInfo();
attrsForVerify = PlugletTagInfo_obj.getAttributes();
actionPerformed = true;
System.err.println("PlugletTagInfo_getAttributes returns \"" + attrsForVerify + "\" value");
String allAttributes = context.getProperty("ALL_ATTRIBUTES");
verifyAttributes(allAttributes);
}
public static void verifyAttributes(String attrString)
{

View File

@@ -54,7 +54,11 @@ TESTS = PlugletPeer_getMIMEType \
PlugletStreamInfo_getURL \
PlugletStreamInfo_isSeekable \
PlugletStreamInfo_requestRead \
PlugletTagInfo2_getAlignment \
PlugletTagInfo2_getAlignment_left \
PlugletTagInfo2_getAlignment_right \
PlugletTagInfo2_getAlignment_top \
PlugletTagInfo2_getAlignment_bottom \
PlugletTagInfo2_getAlignment_middle \
PlugletTagInfo_getAttribute \
PlugletTagInfo_getAttributes \
PlugletTagInfo2_getParameter \
@@ -83,7 +87,7 @@ TESTS = PlugletPeer_getMIMEType \
PlugletPeer_newStream_0 \
PlugletPeer_newStream_1
#Make all, needed for running Pluglet API tests
default: classes tests test_pluglet
all: classes tests test_pluglet
#Compile utils for creating test templates
util:
@@ -91,12 +95,12 @@ util:
#Copmile test and test iterators classes
classes:
@echo Compile classes ..
@echo Building .basic.api classes ..
@$(JAVAC) -d $(BUILD_DIR_CLASSES) Pluglet*.java
test_pluglet:
copy manifest $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\api
cd $(BUILD_DIR_CLASSES)
$(JDKHOME)\bin\jar cvfm $(BASIC_PATH)\api\TestAPIPluglet.jar $(BASIC_PATH)\api\manifest $(BASIC_PATH)\*.class $(BASIC_PATH)\api\*.class
@copy manifest $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\api
@cd $(BUILD_DIR_CLASSES)
@$(JDKHOME)\bin\jar cfm $(BASIC_PATH)\api\TestAPIPluglet.jar $(BASIC_PATH)\api\manifest $(BASIC_PATH)\*.class $(BASIC_PATH)\api\*.class
#Performs make in tests directories.
#Copy test htmls and props files to the build directory,
#make java files, if neccessary
@@ -113,13 +117,14 @@ combinations:
@set MAKE_ARGS=$@
@nmake -f makefile.win $(TESTS)
#Clobber all test class, data and html files
#Clobber all test classes, data and html files
#Clobber all api testcases there.
clobber:
@echo Make clobber ..
@echo Remove classes ..
@del $(CLASSES_LOCATION)\*.class
@set MAKE_ARGS=$@
@nmake -f makefile.win $(TESTS)
@echo Make clobber for api tests.
@-del /Q /S $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\api\*
@-del /Q /S $(HTML_ROOT_DIR)\api\*
@-del /Q /S $(BUILD_DIR)\test\basic\api\*
$(TESTS)::
@echo Making %MAKE_ARGS% in $@
@@ -144,9 +149,3 @@ $(TESTS)::

View File

@@ -27,6 +27,7 @@
# Attach Perl Libraries
###################################################################
use Cwd;
use Cwd 'abs_path';
use File::Copy;
#For waitpid
use POSIX ":sys_wait_h";
@@ -64,6 +65,11 @@ sub usage() {
print "\n";
print " where <test cases list file> is file with test cases list\n";
print "\n";
print "or:\n";
print " perl autorun.pl [ -t <test case> ]\n";
print "\n";
print " where <test case> is one of the test cases IDs\n";
print " name ex: basic/api/PlugletTagInfo2_getAttributes\n";
print "\n";
print "##################################################################\n";
print "\n";
@@ -76,16 +82,11 @@ sub usage() {
sub title() {
print "\n";
print "################################################\n";
print " Automated Execution of Java Pluglet API TestSuite\n";
print "################################################\n";
print "##################################################################\n";
print " Automated Execution of Java Pluglet API TestSuite\n";
print "##################################################################\n";
print "\n";
print "\n";
print "\n";
print "\n";
print "\n";
print "\n";
}
##################################################################
@@ -98,18 +99,6 @@ sub checkRun() {
}
#########################################################################
#
# Append table entries to Output HTML File
#
#########################################################################
sub appendEntries() {
print LOGHTML "<tr><td></td><td></td></tr>\n";
print LOGHTML "<tr><td></td><td></td></tr>\n";
print LOGHTML "<tr bgcolor=\"#FF6666\"><td>Test Status (XML)</td><td>Result</td></tr>\n";
}
#########################################################################
#
# Construct Output HTML file Header
@@ -126,7 +115,7 @@ sub constructHTMLHeader() {
print LOGHTML "</h2></center>\n";
print LOGHTML "<hr noshade>";
print LOGHTML "<table bgcolor=\"#99FFCC\">\n";
print LOGHTML "<tr bgcolor=\"#FF6666\">\n";
print LOGHTML "<tr bgcolor=\"lightblue\">\n";
print LOGHTML "<td>Test Case</td>\n";
print LOGHTML "<td>Result</td>\n";
print LOGHTML "</tr>\n";
@@ -138,20 +127,25 @@ sub constructHTMLHeader() {
#
#########################################################################
sub constructHTMLBody() {
open( MYLOG, $LOGTXT ) || print "WARNING: Cann't open $LOGTXT,HTML_LOG may be incorrect\n";
@all_lines = <MYLOG>;
close( MYLOG ) || print "WARNING: Cann't close $LOGTXT,HTML_LOG may be incorrect\n";
my $line;
foreach $line ( sort @all_lines ) {
# avoid linebreaks
chop $line;
# assuming that all lines are kind'of 'aaa=bbb'
($class, $status) = split /=/, $line;
print LOGHTML "<tr><td>",$class,"</td><td>",$status,"</td></tr>\n";
}
if (open(LOGTXT,$LOGTXT)) {
my @all_lines = <LOGTXT>;
close( LOGTXT ) || print "WARNING: Can't close $LOGTXT,HTML_LOG may be incorrect\n";
my $line;
foreach $line ( @all_lines ) {
# avoid linebreaks
chop $line;
# assuming that all lines are kind'of 'aaa=bbb'
($class, $status) = split /=/, $line;
print LOGHTML "<tr><td>",$class,"</td>";
if ($status=~/FAILED/) {
print LOGHTML "<td><font color=\"red\">",$status,"</font></td></tr>\n";
} else {
print LOGHTML "<td>",$status,"</td></tr>\n";
}
}
} else {
print "WARNING: Can't open $LOGTXT,HTML_LOG may be incorrect\n";
}
}
#########################################################################
@@ -169,8 +163,14 @@ sub constructHTMLFooter() {
#
#########################################################################
sub constructHTML() {
constructHTMLHeader;
constructHTMLBody;
if (open( LOGHTML, ">$LOGHTML" )) {
constructHTMLHeader();
constructHTMLBody();
constructHTMLFooter();
close( LOGHTML) || print("WARNING: Can't close HTML file... $!\n");
} else {
print("WARNING: Can't open HTML file... $!\n");
}
}
#########################################################################
@@ -224,7 +224,7 @@ sub constructLogString {
sub safeAppend {
my $file = shift(@_);
my $line = shift(@_);
open (FILE, ">>$file") or die ("Cann't open $file");
open (FILE, ">>$file") or die ("Can't open $file");
print FILE $line;
close FILE;
}
@@ -236,14 +236,15 @@ sub safeAppend {
########################################################################
sub loadParams {
my $file = shift(@_);
my $key, $value, %params;
open (PARAMS, "<$file") || print "WARNING: Can't open parameters file $file\n";
my $key;
my $value;
my %params;
open (PARAMS, "<$file") || die "ERROR: Can't open parameters file $file\n";
while ($pair = <PARAMS>) {
chomp($pair);
$pair=~s#^\s*|\s*$##g;
($key,$value) = split('=', $pair);
$params{$key} = $value;
print "$key,$value\n";
}
close(PARAMS) || print "WARNING: Can't close parameters file $file\n";
return %params;
@@ -265,10 +266,8 @@ sub getGlobParam {
# Getting test parameters
#
########################################################################
sub getTestParam {
my $path;
$path = getTestDir(shift(@_));
print "TestDir is $path\n";
sub getTestParam {
my $path = getTestDir(shift(@_));
if (! $test_params_loaded){
%test_params = loadParams("$path/$test_params_file_name");
$test_params_loaded = 1;
@@ -300,15 +299,15 @@ sub copyTestDataIfAny {
my @list = <*.lst>;
#chdir($curdir); #Commented by avm
if ($list[0]) {
open (LST, $list[0]) || die "Cann't open file $list[0]\n";
open (LST, $list[0]) || die "ERROR: Can't open file $list[0]\n";
while ($tp = <LST>){
if ($tp =~ /$num: /) {
open (TP_OUT, ">$path/$list[0].TEMP") || die "Cann't open file >$path/$list[0].TEMP";
open (TP_OUT, ">$path/$list[0].TEMP") || die "ERROR: Can't open file >$path/$list[0].TEMP";
$tp =~ s/$num: //;
print TP_OUT $tp;
chomp($tp);
print "--Save parameters line \"$tp\" to $path/$list[0].TEMP for test number $num\n";
close TP_OUT || die "Cann't close file $path/$list[0].TEMP\n";
close TP_OUT || print "WARNING: Can't close file $path/$list[0].TEMP\n";
chdir($curdir);
return "$path/$list[0].TEMP";
}
@@ -324,15 +323,19 @@ sub copyTestDataIfAny {
#
########################################################################
sub checkResultFile {
open(TEST_RESULT, $test_result_file_name) || print "Cann't open $test_result_file_name,\n",
"test aborted or DELAY_FACTOR so small.\n";
$result = <TEST_RESULT>;
chomp $result;
$result=~s#^\s*|\s*$##g;
close(TEST_RESULT);
if ($result eq "PASSED") {
return 1;
if (open(TEST_RESULT, $test_result_file_name)) {
$result = <TEST_RESULT>;
chomp $result;
$result=~s#^\s*|\s*$##g;
close(TEST_RESULT) || print "WARNING: Can't close $test_result_file_name";
if ($result eq "PASSED") {
return 1;
} else {
return 0;
}
} else {
print "WARNING: Can't open $test_result_file_name,\n",
"test aborted or DELAY_FACTOR so small.\n";
return 0;
}
}
@@ -359,10 +362,7 @@ sub runTestCaseUx {
my $testcase = shift(@_);
$test_params_loaded = 0;
open(LST_OUT, ">$LST_OUT") or die ("Cann't open LST_OUT file... $!\n");
print LST_OUT $testcase;
close(LST_OUT) || die ("Cann't close LST_OUT file...\n");
chdir( $mozhome );
print "========================================\n";
$logstr="Running TestCase $testcase....";
@@ -373,11 +373,11 @@ sub runTestCaseUx {
$nom =~ s/\/|:/_/g;
$testlog = "$logdir/$nom.log";
open( TST, ">$mozhome/StartProperties");
open( TST, ">$mozhome/StartProperties") || die "ERROR: Can't create $mozhome/StartProperties\n";
print TST "TEST_TOP_DIR=$topdir\n";
print TST "TEST_DIR=".getTestDir($testcase)."\n";
print TST "TEST_CASE=$testcase\n";
close( TST);
close( TST) || print "WARNING:Can't close $mozhome/StartProperties\n";
#clear log files ..
unlink("$mozhome/$test_log_file_name") ;
@@ -394,44 +394,44 @@ sub runTestCaseUx {
$pluglet =~ s/$file_separator[^$file_separator]*$//;
$ENV{"PLUGLET"} = $pluglet;
}
print "--TestDir is: ".getTestDir($testcase)."\n";
print "--Use pluglet from: ", $ENV{"PLUGLET"},"\n";
print "--Starting ","$mozhome/$program_name $program_args $testhtml\n";
exec("$mozhome/$program_name $program_args $testhtml 2>&1 1>$testlog") or print STDERR "ERROR:cann't start $program_name\n";
open( STDOUT, ">$testlog" ) || print "WARNING: Can't redirect STDOUT\n";
open( STDERR, ">&STDOUT" ) || print "WARNING: Can't redirect STDOUT\n";
select STDERR; $|=1; select STDOUT; $|=1;
exec("$mozhome/$program_name", split(/ /,"$program_args $testhtml")) or print STDERR "ERROR:cann't start $program_name\n";
die "Unfortunately exec behaviour .";
}
#parent ..
$flag = 0;
#this is parent process
$cnt = 0;
$grppid = getpgrp(0);
print "Enter to parent ....";
while (true) {
print "Sleep to $DELAY_OF_CYCLE -- $pid\n";
sleep($DELAY_OF_CYCLE);
$ret = waitpid($pid,&WNOHANG);
if ($ret) { #Test exited
print "Test exited ...";
if (waitpid($pid,&WNOHANG)) { #Test exited
$logstr = "Mozilla terminated by signal ".($? & 127)." with exitcode ".($? >> 8);
constructLogString "$logstr";
if (-e "$mozhome/core") {
print("Test dumped core\n");
safeAppend $LOGTXT,"$testcase=FAILED\n";
$logstr="Test dumped core...";
constructLogString "$logstr";
}
if (!checkResultFile()) {
constructLogString "$logstr";
$logstr = "Check ErrorLog File $testlog ";
constructLogString "$logstr";
constructLogString "";
unlink "$mozhome/core";
}elsif (!checkResultFile()) {
print("Register FAILED\n");
safeAppend $LOGTXT, "$testcase=FAILED\n";
$logstr = "Test FAILED by autorun.pl ...";
constructLogString "$logstr";
} else {
print("Register PASSED\n");
safeAppend $LOGTXT, "$testcase=PASSED\n";
}
$logstr = "Check ErrorLog File $testlog ";
constructLogString "$logstr";
constructLogString "";
constructLogString "";
$flag = 1;
last;
}
$cnt += $DELAY_OF_CYCLE;
if ( $cnt >= $DELAY_FACTOR ) {
$flag = 0;
if (checkResultFile) {
print("Register PASSED\n");
safeAppend $LOGTXT, "$testcase=PASSED\n";
@@ -439,33 +439,22 @@ sub runTestCaseUx {
print("Register FAILED\n");
safeAppend $LOGTXT, "$testcase=FAILED\n";
}
print "kill $pid by timeout\n";
@processes=`ps -o pgid,pid,cmd|grep $grppid|grep $program_name`;
@pids;
for($i=0;$i<=$#processes;$i++) {
$processes[$i]=~/\s*$grppid\s+(.*?\s)/;
$pids[$i]=$1;
}
kill 9, @pids;
kill 9, $pid;
sleep(1);
wait();# take exit code
last;
}
} # while with sleep
print "\nWHILE exited\n";
open(TEST_LOG, "$mozhome/$test_log_file_name") ;
#|| print "WARNING: Cann't open $mozhome/$test_log_file_name \n";
while (<TEST_LOG>) {
chomp($_);
constructLogString $_;
if (open(TEST_LOG, "$mozhome/$test_log_file_name")) {
while (<TEST_LOG>) {
chomp($_);
constructLogString $_;
}
close(TEST_LOG);
unlink("$mozhome/$test_log_file_name") || print "WARNING: Can't remove $mozhome/$test_log_file_name\n";
}
close(TEST_LOG) ;
#|| print "WARNING: Cann't close $mozhome/$test_log_file_name \n";
unlink("$mozhome/$test_log_file_name") ||
print "WARNING: Cann't remove $mozhome/$test_log_file_name\n";
unlink("$mozhome/$test_result_file_name") ||
print "WARNING: Cann't remove $mozhome/$test_result_file_name\n";
unlink($LST_OUT) ||
print "WARNING: Cann't remove $LST_OUT\n";
$testDataFile and unlink($testDataFile);
(-f "$mozhome/$test_result_file_name") && unlink("$mozhome/$test_result_file_name");
(-f $testDataFile) && unlink($testDataFile);
}
@@ -481,10 +470,7 @@ sub runTestCaseWin {
my $testcase = shift(@_);
$test_params_loaded = 0;
do 'Win32\Process.pm' || die "Can't do Win32\Process.pm $!";
open(LST_OUT, ">$LST_OUT") or die ("Cann't open LST_OUT file...\n");
print LST_OUT $testcase;
close(LST_OUT) || die ("Cann't close LST_OUT file...\n");
chdir( $mozhome );
print "========================================\n";
$logstr="Running TestCase $testcase....";
@@ -496,16 +482,19 @@ sub runTestCaseWin {
$nom =~ s/\/|:/_/g;
$testlog = "$logdir/$nom.log";
open( TST, ">$mozhome/StartProperties");
print TST "TEST_TOP_DIR=$topdir\n";
print TST "TEST_DIR=".getTestDir($testcase)."\n";
print TST "TEST_CASE=$testcase\n";
close( TST);
if (open( TST, ">$mozhome/StartProperties")) {
print TST "TEST_TOP_DIR=$topdir\n";
print TST "TEST_DIR=".getTestDir($testcase)."\n";
print TST "TEST_CASE=$testcase\n";
close( TST) || print "WARNING: Can't close $mozhome/StartProperties\n";
} else {
die "ERROR: Can't create $mozhome/StartProperties\n";
}
unlink("$mozhome/$test_log_file_name") ;
#|| print "WARNING: Cann't remove$mozhome/$test_log_file_name\n";
unlink("$mozhome/$test_result_file_name") ;
#|| print "WARNING: Cann't remove $mozhome/$test_result_file_name\n";
#Remove log files from previous execution
(-f "$mozhome/$test_log_file_name") && unlink("$mozhome/$test_log_file_name");
(-f "$mozhome/$test_result_file_name") && unlink("$mozhome/$test_result_file_name");
$testDataFile = copyTestDataIfAny($testcase);
$testhtml = getGlobParam("HTML_ROOT")."/".getTestParam($testcase, "TEST_HTML");
$pluglet = getTestParam($testcase, "PLUGLET");
@@ -532,16 +521,15 @@ sub runTestCaseWin {
open( STDOUT, ">&SAVEOUT" ) || print "WARNING: Cann't restore STDOUT\n";
open( STDERR, ">&SAVEERR" ) || print "WARNING: Cann't restore STDERR\n";
#Restore CLASSPATH if it was changed
if ($pluglet) {
$ENV{"CLASSPATH"}=$saved_classpath;
}
#Restore CLASSPATH if it was changed
if ($pluglet) {
$ENV{"CLASSPATH"}=$saved_classpath;
}
$flag = 0;
$cnt = 0;
while (true) {
sleep($DELAY_OF_CYCLE);
system("$topdir\\utils\\Killer.exe");
$ProcessObj->GetExitCode($exit_code);
if ( $exit_code != $STILL_ALIVE ) {
@@ -549,16 +537,12 @@ sub runTestCaseWin {
constructLogString "$logstr";
if ( (! checkResultFile) or ($exit_code != 0)) {
safeAppend $LOGTXT, "$testcase=FAILED\n";
$logstr = "Test FAILED by autorun.pl ...";
constructLogString "$logstr";
constructLogString "Test FAILED by autorun.pl ...";
constructLogString "Check ErrorLog File $testlog ";
constructLogString "";
} else {
safeAppend $LOGTXT, "$testcase=PASSED\n";
}
$logstr = "Check ErrorLog File $testlog ";
constructLogString "$logstr";
constructLogString "";
constructLogString "";
}
$flag = 1;
last;
}
@@ -578,31 +562,26 @@ sub runTestCaseWin {
}
} # while with sleep
open(TEST_LOG, "$mozhome/$test_log_file_name") ;
#|| print "WARNING: Cann't open $mozhome/$test_log_file_name \n";
while (<TEST_LOG>) {
chomp($_);
constructLogString $_;
if (open(TEST_LOG, "$mozhome/$test_log_file_name")) {
while (<TEST_LOG>) {
chomp($_);
constructLogString $_;
}
close(TEST_LOG);
unlink("$mozhome/$test_log_file_name");
}
close(TEST_LOG) ;
#|| print "WARNING: Cann't close $mozhome/$test_log_file_name \n";
unlink("$mozhome/$test_log_file_name") ||
print "WARNING: Cann't remove $mozhome/$test_log_file_name\n";
unlink("$mozhome/$test_result_file_name") ||
print "WARNING: Cann't remove $mozhome/$test_result_file_name\n";
unlink($LST_OUT) ||
print "WARNING: Cann't remove $LST_OUT\n";
$testDataFile and unlink($testDataFile);
(-f "$mozhome/$test_result_file_name") && unlink("$mozhome/$test_result_file_name");
(-f $testDataFile) && unlink($testDataFile);
}
##################################################################
# main
##################################################################
title;
title();
$curdir = cwd();
$topdir = "$curdir/../../../../../..";
$depth="../../../../../..";
$topdir = abs_path($depth);
$date = localtime;
$date =~ s/[ :]/_/g;
$logdir = "$topdir/log/$date";
@@ -613,15 +592,12 @@ $LOGFILE = "$logdir/BWTestRun.log";
$LOGTXT = "$logdir/BWTest.txt";
$LOGHTML = "$logdir/BWTest.html";
$LST_OUT = "$logdir/BWTest.lst.out";
$test_params_file_name = "TestProperties";
$glob_params_file_name = "CommonProperties";
$test_log_file_name = "PlugletTest.log";
$test_result_file_name = "PlugletTest.res";
$HTML_ROOT = "HTML_ROOT";
$TEST_HTML = "TEST_HTML";
$glob_params_loaded = 0;
# process command-line parameters
@@ -648,24 +624,13 @@ if ($#ARGV >= 0) {
$mozhome = $ENV{"MOZILLA_FIVE_HOME"};
( $mozhome eq "" ) and die "MOZILLA_FIVE_HOME is not set. Please set it and rerun this script....\n";
( -f "$mozhome/$program_name" ) or die "Could not find $program_name in MOZILLA_FIVE_HOME.\n";
# Here must come a piece of code, that determinates
# apprunner instance, removes core, but there's no
# core under win32
$id=$$;
# Prepare log streams
open( LOGFILE, ">>$LOGFILE" ) or die("Can't open LOG file... $!\n");
# Prepare TXT log stream
open( LOGFILE, ">>$LOGFILE" ) || die("ERROR: Can't open LOG file... $!\n");
select LOGFILE; $| = 1; select STDOUT;
open( LOGHTML, ">$LOGHTML" ) or die("Can't open HTML file... $!\n");
#$ENV{"CLASSPATH"} = "$topdir/build/classes".$path_separator.$ENV{"CLASSPATH"};
constructLogHeader();
constructHTMLHeader();
$DELAY_FACTOR=getGlobParam("DELAY");
$DELAY_OF_CYCLE=getGlobParam("DELAY_OF_CYCLE");
@@ -673,22 +638,24 @@ $DELAY_OF_CYCLE=getGlobParam("DELAY_OF_CYCLE");
if ($runtype == 1){
runTestCase($testcase);
} else {
open( LST_IN, $LST_IN ) or die("Can't open $LST_IN...\n");
while( $line = <LST_IN> ) {
chomp $line;
$line=~s#^\s*|\s*$##g;
$testcase = $line;
if ( $testcase =~ /^\s*#/ ) {
open( LST_IN, $LST_IN ) || die("ERROR: Can't open $LST_IN...\n");
while( $testcase = <LST_IN> ) {
chomp $testcase;
$testcase=~s#^\s*|\s*$##g;
if ( ($testcase =~ /^\s*#/)||($testcase eq "")) {
next;
}
runTestCase($testcase);
}
}
constructLogFooter;
constructHTMLBody;
constructHTMLFooter;
$newfile="$mozhome/BWProperties.$id";
rename "$newfile", "$mozhome/BWProperties";
constructLogFooter();
constructHTML();
chdir($curdir);

View File

@@ -30,13 +30,16 @@ CLASSPATH=$(BUILD_DIR_CLASSES);$(CLASSPATH)
TEST_DIRS=api params security returns scenario
all: basic $(TEST_DIRS)
all: basic tests
$(TEST_DIRS)::
@echo Making $(MAKE_ARGS) in $@
@cd $@
@nmake -f makefile.win
@$(MAKE) /NOLOGO -f makefile.win $(MAKE_ARGS)
@cd ..
tests:
@set MAKE_ARGS=all
@nmake -f makefile.win $(TEST_DIRS)
basic: classes TestLoaderPluglet.jar
classes:
@@ -53,5 +56,9 @@ add_files:
@xcopy manifest $(BUILD_DIR_CLASSES)\$(BASIC_PATH)
clobber:
@cd $(BUILD_DIR_CLASSES)\$(BASIC_PATH)
-del *.class *.jar
@del /Q $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\*.class
@del /Q $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\*.jar
@del /F $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\manifest
@set MAKE_ARGS=$@
@nmake -f makefile.win $(TEST_DIRS)

View File

@@ -24,15 +24,13 @@ BUILD_DIR=$(DEPTH)/build
BUILD_DIR_CLASSES=$(BUILD_DIR)/classes
JAVAC=javac
BASIC_PATH=org/mozilla/pluglet/test/basic
CLASSPATH=$(MOZILLA_FIVE_HOME)/../classes:$(BUILD_DIR_CLASSES):$$(CLASSPATH)
HTML_ROOT_DIR=/set/Mozilla/avm/pl_sol/build/htroot
#$$(HTML_ROOT_DIR)
CLASSPATH=$(MOZILLA_FIVE_HOME)/../classes:$(BUILD_DIR_CLASSES)
all: classes tests_common tests_onda
classes:
@echo Building .basic.params classes ...
@$(JAVAC) -d $(BUILD_DIR_CLASSES) *.java
@$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR_CLASSES) *.java
@echo done
ONDA_TESTS= \
@@ -72,7 +70,7 @@ tests_common:
perl $(UTIL_DIR)/configurator.pl $(COMMON_CONFIG_FILE) $(BUILD_DIR)/test/basic/params/$${i}/TestProperties $${i}/TestProperties; \
mkdir -p $(HTML_ROOT_DIR)/basic/params/$${i}; \
mkdir -p $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/params/$${i}; \
if [ -e $${i}/*.html ] ; then \
if test -f $${i}/*.html ; then \
cp -f $${i}/*.html $(HTML_ROOT_DIR)/basic/params/$${i}; \
fi; \
cp -f $${i}/manifest $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/params/$${i}; \

View File

@@ -62,9 +62,9 @@ tests: $(TESTS)
clobber:
@cd $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\params
-del *.class *.jar
@-del /Q /S $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\params\*
@-del /Q /S $(BUILD_DIR)\test\basic\params\*
@-del /Q /S $(HTML_ROOT_DIR)\basic\params\*
$(TESTS) ::
@echo Making test $@
@@ -93,3 +93,13 @@ Pluglet_createPlugletInstance_mimeType_6::
PlugletStreamListener_onDataAvailable_input_1 PlugletStreamListener_onDataAvailable_input_2 PlugletStreamListener_onDataAvailable_input_3 PlugletStreamListener_onDataAvailable_input_4 PlugletStreamListener_onDataAvailable_input_5 PlugletStreamListener_onDataAvailable_input_6 PlugletStreamListener_onDataAvailable_input_7 PlugletStreamListener_onDataAvailable_input_8 PlugletStreamListener_onDataAvailable_input_9 PlugletStreamListener_onDataAvailable_input_11 PlugletStreamListener_onDataAvailable_input_12 ::
@ -1 copy $@\test.tdt $(HTML_ROOT_DIR)\basic\params\$@
@ -1 copy $@\test.tdt $(BUILD_DIR)\test\basic\params\$@

View File

@@ -31,7 +31,7 @@ all: classes tests
classes:
@echo Building .basic.returns classes ...
@$(JAVAC) -d $(BUILD_DIR_CLASSES) *.java
@$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR_CLASSES) *.java
@echo done

View File

@@ -46,8 +46,9 @@ tests: $(TESTS)
clobber:
@cd $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\returns
-del *.class *.jar
@-del /Q /S $(BUILD_DIR_CLASSES)\$(BASIC_PATH)\returns\*
@-del /Q /S $(HTML_ROOT_DIR)\basic\returns\*
@-del /Q /S $(BUILD_DIR)\test\basic\returns\*
$(TESTS) ::

View File

@@ -3,8 +3,7 @@
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>scenario<FSEP>TestSeqScenarioPluglet.jar
TEST_CLASS=org.mozilla.pluglet.test.basic.scenario.SequencialScenarioTest
TEST_HTML=basic/scenario/bastest.html
RUN_STAGES= \
PLUGLET_INITIALIZE \
RUN_STAGES=PLUGLET_INITIALIZE \
PLUGLET_CREATE_PLUGLET_INSTANCE \
PLUGLET_INSTANCE_INITIALIZE \
PLUGLET_INSTANCE_START \

View File

@@ -3,8 +3,7 @@
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>scenario<FSEP>TestSeqScenarioPluglet.jar
TEST_CLASS=org.mozilla.pluglet.test.basic.scenario.SequencialScenarioTest
TEST_HTML=basic/scenario/5/newwindow.html
RUN_STAGES= \
PLUGLET_INITIALIZE \
RUN_STAGES=PLUGLET_INITIALIZE \
PLUGLET_CREATE_PLUGLET_INSTANCE \
PLUGLET_INSTANCE_INITIALIZE \
PLUGLET_INSTANCE_START \

View File

@@ -2,15 +2,14 @@
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>scenario<FSEP>TestSeqScenarioPluglet.jar
TEST_CLASS=org.mozilla.pluglet.test.basic.scenario.SequencialScenarioTest
TEST_HTML=basic/scenario/bastestsrc.html
RUN_STAGES= \
PLUGLET_INITIALIZE \
RUN_STAGES=PLUGLET_INITIALIZE \
PLUGLET_CREATE_PLUGLET_INSTANCE \
PLUGLET_INSTANCE_INITIALIZE \
PLUGLET_INSTANCE_START \
PLUGLET_INSTANCE_NEW_STREAM \
PLUGLET_STREAM_LISTENER_ON_START_BINDING \
PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE \
PLUGLET_STREAM_LISTENER_ON_STOP_BINDING
PLUGLET_STREAM_LISTENER_ON_STOP_BINDING \
PLUGLET_INSTANCE_STOP \
PLUGLET_INSTANCE_DESTROY \
PLUGLET_SHUTDOWN
@@ -23,7 +22,7 @@ STAGE_5=PLUGLET_INSTANCE_NEW_STREAM
STAGE_6=PLUGLET_STREAM_LISTENER_ON_START_BINDING
STAGE_7=PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE
STAGE_7_REPEATABLE=TRUE
STAGE_7_ACTION=READ_STREAM
STAGE_7_ACTION=LOAD_STREAM
STAGE_8=PLUGLET_STREAM_LISTENER_ON_STOP_BINDING
STAGE_8_ACTION=WINDOW_CLOSE
STAGE_9=PLUGLET_INSTANCE_STOP

View File

@@ -3,15 +3,14 @@
PLUGLET=<TEST_TOP_DIR><FSEP>build<FSEP>classes<FSEP>org<FSEP>mozilla<FSEP>pluglet<FSEP>test<FSEP>basic<FSEP>scenario<FSEP>TestSeqScenarioPluglet.jar
TEST_CLASS=org.mozilla.pluglet.test.basic.scenario.SequencialScenarioTest
TEST_HTML=basic/scenario/bastestsrc.html
RUN_STAGES= \
PLUGLET_INITIALIZE \
RUN_STAGES=PLUGLET_INITIALIZE \
PLUGLET_CREATE_PLUGLET_INSTANCE \
PLUGLET_INSTANCE_INITIALIZE \
PLUGLET_INSTANCE_START \
PLUGLET_INSTANCE_NEW_STREAM \
PLUGLET_STREAM_LISTENER_ON_START_BINDING \
PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE \
PLUGLET_STREAM_LISTENER_ON_STOP_BINDING
PLUGLET_STREAM_LISTENER_ON_STOP_BINDING \
PLUGLET_INSTANCE_STOP \
PLUGLET_INSTANCE_DESTROY \
PLUGLET_SHUTDOWN
@@ -24,7 +23,7 @@ STAGE_5=PLUGLET_INSTANCE_NEW_STREAM
STAGE_6=PLUGLET_STREAM_LISTENER_ON_START_BINDING
STAGE_7=PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE
STAGE_7_REPEATABLE=TRUE
STAGE_7_ACTION=READ_STREAM
STAGE_7_ACTION=LOAD_STREAM
STAGE_8=PLUGLET_STREAM_LISTENER_ON_STOP_BINDING
STAGE_8_ACTION=WINDOW_RELOAD
STAGE_9=PLUGLET_INSTANCE_STOP
@@ -34,5 +33,5 @@ STAGE_11=PLUGLET_INSTANCE_NEW_STREAM
STAGE_12=PLUGLET_STREAM_LISTENER_ON_START_BINDING
STAGE_13=PLUGLET_STREAM_LISTENER_ON_DATA_AVAILABLE
STAGE_13_REPEATABLE=TRUE
STAGE_13_ACTION=READ_STREAM
STAGE_13_ACTION=LOAD_STREAM
STAGE_14=PLUGLET_STREAM_LISTENER_ON_STOP_BINDING

View File

@@ -31,7 +31,7 @@ all: tests TestSeqScenarioPluglet.jar
classes:
@echo Building .basic.scenario classes ...
@$(JAVAC) -d $(BUILD_DIR_CLASSES) *.java
@$(JAVAC) -classpath $(CLASSPATH) -d $(BUILD_DIR_CLASSES) *.java
@echo done
add_files:
@@ -42,13 +42,13 @@ TestSeqScenarioPluglet.jar: classes add_files
$(JDKHOME)/bin/jar cfm $(BASIC_PATH)/scenario/TestSeqScenarioPluglet.jar $(BASIC_PATH)/scenario/manifest $(BASIC_PATH)/*.class $(BASIC_PATH)/scenario/*.class
clobber:
@if [ -e $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/scenario ]; then \
@if test -d $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/scenario ; then \
rm -rf $(BUILD_DIR_CLASSES)/$(BASIC_PATH)/scenario/* ; \
fi
@if [ -e $(BUILD_DIR)/test/basic/scenario/ ]; then \
@if test -d $(BUILD_DIR)/test/basic/scenario/ ; then \
rm -rf $(BUILD_DIR)/test/basic/scenario/*; \
fi
@if [ -e $(HTML_ROOT_DIR)/basic/scenario ]; then \
@if test -d $(HTML_ROOT_DIR)/basic/scenario ; then \
rm -rf $(HTML_ROOT_DIR)/basic/scenario/*; \
fi
tests:
@@ -59,10 +59,10 @@ tests:
mkdir -p $(BUILD_DIR)/test/basic/scenario/$${i}; \
mkdir -p $(HTML_ROOT_DIR)/basic/scenario/$${i}; \
perl $(UTIL_DIR)/configurator.pl $(COMMON_CONFIG_FILE) $(BUILD_DIR)/test/basic/scenario/$${i}/TestProperties $${i}/TestProperties; \
if [ -e $${i}/*.html ]; then \
if test -f $${i}/*.html ; then \
cp -f $${i}/*.html $(HTML_ROOT_DIR)/basic/scenario/$${i}; \
fi; \
if [ -e $${i}/*.js ]; then \
if test -f $${i}/*.js ; then \
cp -f $${i}/*.js $(HTML_ROOT_DIR)/basic/scenario/$${i}; \
fi; \
done
done

View File

@@ -1,8 +1,8 @@
<html>
<title> Page for automatically forward</title>
<script>
if (history.next) {
history.forward();
if (window.next) {
window.forward();
} else {
window.location = "bastest.html";
}
@@ -11,4 +11,4 @@ if (history.next) {
<body>
After you have seen this page the forward should be done automatically
</body>
</html>
</html>

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