Modified Test Cases. All previously unsupported methods have been
supported. Test Cases for the same have been updated. git-svn-id: svn://10.0.0.236/trunk@73675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -74,24 +74,29 @@ public class AttrImpl_getOwnerElement extends BWBaseTest implements Execution
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Attr a = d.createAttribute("dummyattr_2");
|
||||
if (a == null) {
|
||||
TestLoader.logErrPrint("Could not Create Attribute dummyattr_2..");
|
||||
Element e = d.getDocumentElement();
|
||||
if (a == null || e == null) {
|
||||
TestLoader.logErrPrint("Could not Create Attribute dummyattr_2 or get document element ..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
Element e = a.getOwnerElement();
|
||||
TestLoader.logErrPrint("Attr 'getOwnerElement()' is not a supported method ...");
|
||||
e.setAttributeNode(a);
|
||||
Attr da = e.getAttributeNode("dummyattr_2");
|
||||
Element oe = da.getOwnerElement();
|
||||
if (oe != null) { //here we also need to check that oe is the same ???
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
TestLoader.logErrPrint("Attr 'getOwnerElement()' returned incorrect element: "+oe+" "+oe.getNodeType());
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception ex) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+ex);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -75,7 +75,7 @@ public class DOMImplementationImpl_createDocumentType_String_String_String_0 ext
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -86,26 +86,28 @@ public class DOMImplementationImpl_createDocumentType_String_String_String_0 ext
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (di.createDocumentType(null, null, null) == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(null, null, null) according to specs. is not supported...");
|
||||
String qualifiedName = "edi:price";
|
||||
String publicId = "pID";
|
||||
String systemId = "sID";
|
||||
DocumentType dt = di.createDocumentType(qualifiedName, publicId, systemId);
|
||||
if (dt == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(...) returned null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocumentType(null, null, null)' according to specs is not supported...");
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException was thrown: "+de);
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocumentType_String_String_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocumentType_String_String_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
String qualifiedName = null;
|
||||
String publicId = "pID";
|
||||
String systemId = "sID";
|
||||
DocumentType dt = di.createDocumentType(qualifiedName, publicId, systemId);
|
||||
if (dt == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(...) returned null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocumentType(...)' didn't throw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException was thrown: "+de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocumentType_String_String_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocumentType_String_String_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
String qualifiedName = "edi:price";
|
||||
String publicId = null;
|
||||
String systemId = "sID";
|
||||
DocumentType dt = di.createDocumentType(qualifiedName, publicId, systemId);
|
||||
if (dt == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(...) returned null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocumentType(...)' didn't throw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException was thrown: "+de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocumentType_String_String_String_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocumentType_String_String_String_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
String qualifiedName = "edi:price";
|
||||
String publicId = "pID";
|
||||
String systemId = null;
|
||||
DocumentType dt = di.createDocumentType(qualifiedName, publicId, systemId);
|
||||
if (dt == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(...) returned null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocumentType(...)' didn't throw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException was thrown: "+de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocumentType_String_String_String_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocumentType_String_String_String_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
String qualifiedName = null;
|
||||
String publicId = null;
|
||||
String systemId = null;
|
||||
DocumentType dt = di.createDocumentType(qualifiedName, publicId, systemId);
|
||||
if (dt == null) {
|
||||
System.out.println("DomImplementation 'createDocumentType(...) returned null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocumentType(...)' didn't throw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException was thrown: "+de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception was thrown: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,6 @@ public class DOMImplementationImpl_createDocument_String_String_DocumentType_0 e
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -87,29 +86,31 @@ public class DOMImplementationImpl_createDocument_String_String_DocumentType_0 e
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (di.createDocument(null, null, null) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' according to specs. is not supported...");
|
||||
DocumentType dt = di.createDocumentType("edi:price", "pID", "sID");
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("DocumentType is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String namespaceURI = "edi='http://ecommerce.org/schema'";
|
||||
String qualifiedName = "edi:price";
|
||||
if (di.createDocument(namespaceURI, qualifiedName, dt) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' returns null ...");
|
||||
TestLoader.logErrPrint("DomImplementation 'createDocument' returns null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocument' according to specs is not supported...");
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
String msg = "DOMException : " + e;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException : " + de);
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocument_String_String_DocumentType_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocument_String_String_DocumentType_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
String namespaceURI = "edi='http://ecommerce.org/schema'";
|
||||
String qualifiedName = "edi:price";
|
||||
if (di.createDocument(namespaceURI, qualifiedName, null) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' returns null ...");
|
||||
TestLoader.logErrPrint("DomImplementation 'createDocument' returns null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException : " + de);
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocument_String_String_DocumentType_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocument_String_String_DocumentType_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
DocumentType dt = di.createDocumentType("edi:price", "publicID", "systemID");
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("DocumentType is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String namespaceURI = "edi='http://ecommerce.org/schema'";
|
||||
String qualifiedName = "edi:price";
|
||||
if (di.createDocument(namespaceURI, null, dt) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' returns null ...");
|
||||
TestLoader.logErrPrint("DomImplementation 'createDocument' returns null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("createDocumetn didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException : " + de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocument_String_String_DocumentType_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocument_String_String_DocumentType_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
DocumentType dt = di.createDocumentType("edi:price", "publicID", "systemID");
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("DocumentType is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String namespaceURI = "edi='http://ecommerce.org/schema'";
|
||||
String qualifiedName = "edi:price";
|
||||
if (di.createDocument(null, qualifiedName, dt) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' returns null ...");
|
||||
TestLoader.logErrPrint("DomImplementation 'createDocument' returns null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("createDocumetn didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException : " + de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_createDocument_String_String_DocumentType_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_createDocument_String_String_DocumentType_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
DocumentType dt = di.createDocumentType("edi:price", "publicID", "systemID");
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("DocumentType is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String namespaceURI = "edi='http://ecommerce.org/schema'";
|
||||
String qualifiedName = "edi:price";
|
||||
if (di.createDocument(null, null, null) == null) {
|
||||
System.out.println("DomImplementation 'createDocument' returns null ...");
|
||||
TestLoader.logErrPrint("DomImplementation 'createDocument' returns null ...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'createDocument' doesn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (DOMException de) {
|
||||
TestLoader.logErrPrint("DOMException : " + de);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class DocumentImpl_createEvent_String_0 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
@@ -85,18 +85,14 @@ public class DocumentImpl_createEvent_String_0 extends BWBaseTest implements Exe
|
||||
try {
|
||||
String s = null;
|
||||
Event e = d.createEvent(s);
|
||||
TestLoader.logErrPrint("DocumentEvent is not a supported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
} catch (Exception e) {
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@ public class DocumentImpl_createEvent_String_1 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
import org.w3c.dom.events.*;
|
||||
|
||||
public class DocumentImpl_createEvent_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createEvent_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String s = "SomeIncorrectEventType";
|
||||
Event e = d.createEvent(s);
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (Exception e) {
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -74,27 +74,29 @@ public class DocumentImpl_getElementById_String_0 extends BWBaseTest implements
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
Element e = d.getElementById(null);
|
||||
TestLoader.logErrPrint("Document 'getElementById'is an unsupported method");
|
||||
return BWBaseTest.FAILED;
|
||||
String id = "body_tag_id";
|
||||
Element e = d.getElementById(id);
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document 'getElementById'is retuned null ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
} catch ( UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,20 +74,19 @@ public class DocumentImpl_getElementById_String_1 extends BWBaseTest implements
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
Element e = d.getElementById(null);
|
||||
TestLoader.logErrPrint("Document 'getElementsById'is an unsupported method");
|
||||
Element e = d.getElementById("nonexistent_id");
|
||||
TestLoader.logErrPrint("Document 'getElementsById(nonexistent_id)' didn't throw exception");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch ( UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getElementById_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getElementById_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
|
||||
DocumentImpl d = (DocumentImpl)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
Element e = d.getElementById(null);
|
||||
TestLoader.logErrPrint("Document 'getElementsById(null)' didn't throw exception");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -74,28 +74,30 @@ public class DocumentImpl_getElementsByTagNameNS_String_String_0 extends BWBaseT
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String nuri = null;
|
||||
String qname = null;
|
||||
String nuri = "xmlns:edi='http://ecommerce/schema'";
|
||||
String qname = "body";
|
||||
NodeList dt = d.getElementsByTagNameNS(nuri, qname);
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' returned null ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: " + e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,7 @@ public class DocumentImpl_getElementsByTagNameNS_String_String_1 extends BWBaseT
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -82,14 +82,11 @@ public class DocumentImpl_getElementsByTagNameNS_String_String_1 extends BWBaseT
|
||||
{
|
||||
try {
|
||||
String nuri = null;
|
||||
String qname = "xml";
|
||||
String qname = "body";
|
||||
NodeList dt = d.getElementsByTagNameNS(nuri, qname);
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
} catch (Exception e) {
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -74,22 +74,20 @@ public class DocumentImpl_getElementsByTagNameNS_String_String_2 extends BWBaseT
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String nuri = "";
|
||||
String nuri = "xmlns:edi='http://ec/schema'";
|
||||
String qname = null;
|
||||
NodeList dt = d.getElementsByTagNameNS(nuri, qname);
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' didn't throw exception ... ");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
} catch (Exception ue) {
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -74,22 +74,20 @@ public class DocumentImpl_getElementsByTagNameNS_String_String_3 extends BWBaseT
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String qname = "xml";
|
||||
String nuri = null;
|
||||
String qname = null;
|
||||
NodeList dt = d.getElementsByTagNameNS(nuri, qname);
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagNameNS' didn't thrpw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
} catch (Exception e) {
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class DocumentTypeImpl_getInternalSubset extends BWBaseTest implements Ex
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -85,17 +85,14 @@ public class DocumentTypeImpl_getInternalSubset extends BWBaseTest implements Ex
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String s = dt.getInternalSubset();
|
||||
TestLoader.logErrPrint("DocumentType 'getInternalSubset' according to specs should currently not have been supported...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
}
|
||||
String s = dt.getInternalSubset();
|
||||
if (s == null) {
|
||||
TestLoader.logErrPrint("DocumentType 'getInternalSubset' return null...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
@@ -103,6 +100,8 @@ public class DocumentTypeImpl_getInternalSubset extends BWBaseTest implements Ex
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,7 @@ public class DocumentTypeImpl_getPublicId extends BWBaseTest implements Executio
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -85,17 +85,14 @@ public class DocumentTypeImpl_getPublicId extends BWBaseTest implements Executio
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String s = dt.getPublicId();
|
||||
TestLoader.logErrPrint("DocumentType 'getPublicId' according to specs should currently not have been supported...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
}
|
||||
String s = dt.getPublicId();
|
||||
if (s == null) {
|
||||
TestLoader.logErrPrint("DocumentType 'getPublicId' return null...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
@@ -103,6 +100,7 @@ public class DocumentTypeImpl_getPublicId extends BWBaseTest implements Executio
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,7 @@ public class DocumentTypeImpl_getSystemId extends BWBaseTest implements Executio
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -85,17 +85,14 @@ public class DocumentTypeImpl_getSystemId extends BWBaseTest implements Executio
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String s = dt.getSystemId();
|
||||
TestLoader.logErrPrint("DocumentType 'getSystemId' according to specs should currently not have been supported...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD ";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
}
|
||||
String s = dt.getSystemId();
|
||||
if (s == null) {
|
||||
TestLoader.logErrPrint("DocumentType 'getSystemId' return null...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
@@ -103,6 +100,8 @@ public class DocumentTypeImpl_getSystemId extends BWBaseTest implements Executio
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNS_String_String_0 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -86,29 +86,26 @@ public class ElementImpl_getAttributeNS_String_String_0 extends BWBaseTest imple
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String nuri = null;
|
||||
String lname = null;
|
||||
String nuri = "xmlns:edi='http://ecommerce.com/schema'";
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
String s = e.getAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
if (s == null || !s.equals(val)) {
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' returned incorrect value: "+s+" != "+val);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
} catch (Exception e) {
|
||||
String msg = "Exception: " + e;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNS_String_String_1 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getAttributeNS_String_String_1 extends BWBaseTest imple
|
||||
String nuri = null;
|
||||
String lname = "dummyattr";
|
||||
String s = e.getAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' didn't throw exception");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception e) {
|
||||
String msg = "Exception " + e;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNS_String_String_2 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -86,22 +86,14 @@ public class ElementImpl_getAttributeNS_String_String_2 extends BWBaseTest imple
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String nuri = "";
|
||||
String nuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String lname = null;
|
||||
String s = e.getAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' didn't throw exception ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNS_String_String_3 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -86,22 +86,14 @@ public class ElementImpl_getAttributeNS_String_String_3 extends BWBaseTest imple
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String lname = "dummyattr";
|
||||
String nuri = null;
|
||||
String lname = null;
|
||||
String s = e.getAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' didn't throw exception");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNodeNS_String_String_0 extends BWBaseTest i
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getAttributeNodeNS_String_String_0 extends BWBaseTest i
|
||||
String nuri = null;
|
||||
String lname = null;
|
||||
Node n = e.getAttributeNodeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNodeNS_String_String_1 extends BWBaseTest i
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getAttributeNodeNS_String_String_1 extends BWBaseTest i
|
||||
String nuri = null;
|
||||
String lname = "dummyattr";
|
||||
Node n = e.getAttributeNodeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNodeNS_String_String_2 extends BWBaseTest i
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getAttributeNodeNS_String_String_2 extends BWBaseTest i
|
||||
String nuri = "";
|
||||
String lname = null;
|
||||
Node n = e.getAttributeNodeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getAttributeNodeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getAttributeNodeNS_String_String_3 extends BWBaseTest i
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -88,27 +88,24 @@ public class ElementImpl_getAttributeNodeNS_String_String_3 extends BWBaseTest i
|
||||
} else {
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
Node n = e.getAttributeNodeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
if (n == null || n.getNodeType() != Node.ATTRIBUTE_NODE || !((Attr)n).getValue().equals(val)) {
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' returned incorrect value ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getElementsByTagNameNS_String_String_0 extends BWBaseTe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getElementsByTagNameNS_String_String_0 extends BWBaseTe
|
||||
String nuri = null;
|
||||
String lname = null;
|
||||
NodeList nl = e.getElementsByTagNameNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getElementsByTagNameNS_String_String_1 extends BWBaseTe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getElementsByTagNameNS_String_String_1 extends BWBaseTe
|
||||
String nuri = null;
|
||||
String lname = "dummyattr";
|
||||
NodeList nl = e.getElementsByTagNameNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getElementsByTagNameNS_String_String_2 extends BWBaseTe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_getElementsByTagNameNS_String_String_2 extends BWBaseTe
|
||||
String nuri = "";
|
||||
String lname = null;
|
||||
NodeList nl = e.getElementsByTagNameNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_getElementsByTagNameNS_String_String_3 extends BWBaseTe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -87,29 +87,24 @@ public class ElementImpl_getElementsByTagNameNS_String_String_3 extends BWBaseTe
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String lname = "dummyattr";
|
||||
String lname = "body";
|
||||
NodeList nl = e.getElementsByTagNameNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
if (nl == null) {
|
||||
TestLoader.logErrPrint("Element 'getElementsByTagNameNS' returned incorrect value ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,3 +128,4 @@ public class ElementImpl_getElementsByTagNameNS_String_String_3 extends BWBaseTe
|
||||
else {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttributeNS_String_String_0 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -84,18 +84,12 @@ public class ElementImpl_hasAttributeNS_String_String_0 extends BWBaseTest imple
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (e.hasAttributeNS(null, null)) ;
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... ");
|
||||
}
|
||||
if (e.hasAttributeNS(null, null)) ;
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttributeNS_String_String_1 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -84,18 +84,12 @@ public class ElementImpl_hasAttributeNS_String_String_1 extends BWBaseTest imple
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
}
|
||||
if (e.hasAttributeNS("dummy", null));
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... ");
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttributeNS_String_String_2 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -84,18 +84,12 @@ public class ElementImpl_hasAttributeNS_String_String_2 extends BWBaseTest imple
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (e.hasAttributeNS(null, "dummy"));
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
if (e.hasAttributeNS(null, "dummy"));
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttributeNS_String_String_3 extends BWBaseTest imple
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -84,25 +84,25 @@ public class ElementImpl_hasAttributeNS_String_String_3 extends BWBaseTest imple
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (e.hasAttributeNS("dummy", "dummy"));
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nsuri, lname, val);
|
||||
if (e.hasAttributeNS(nsuri, val) == false) {
|
||||
TestLoader.logErrPrint("Element 'hasAttributeNS returned incorrect value... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "hasAttributeNS: Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
System.out.println("hasAttributeNS: Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttribute_String_0 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -85,18 +85,12 @@ public class ElementImpl_hasAttribute_String_0 extends BWBaseTest implements Exe
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (e.hasAttribute(null));
|
||||
TestLoader.logErrPrint("Element 'hasAttribute(null) is not a supported method. Should not return any value... ");
|
||||
e.hasAttribute(null);
|
||||
TestLoader.logErrPrint("Element 'hasAttribute(null) didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_hasAttribute_String_1 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
@@ -84,25 +84,21 @@ public class ElementImpl_hasAttribute_String_1 extends BWBaseTest implements Exe
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
try {
|
||||
if (e.hasAttribute("name"));
|
||||
TestLoader.logErrPrint("Element 'hasAttribute(null) is not a supported method. Should not return any value... ");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
}
|
||||
if (e.hasAttribute("nonexistent_attribute") == true) {
|
||||
TestLoader.logErrPrint("Element 'hasAttribute returned incorrect value ... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class ElementImpl_hasAttribute_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public ElementImpl_hasAttribute_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
Element e = d.getDocumentElement();
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String attrname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttribute(attrname, val);
|
||||
if (e.hasAttribute(attrname) == false) {
|
||||
TestLoader.logErrPrint("Element 'hasAttribute returned incorrect value ... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_removeAttributeNS_String_String_0 extends BWBaseTest im
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_removeAttributeNS_String_String_0 extends BWBaseTest im
|
||||
String nuri = null;
|
||||
String lname = null;
|
||||
e.removeAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_removeAttributeNS_String_String_1 extends BWBaseTest im
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_removeAttributeNS_String_String_1 extends BWBaseTest im
|
||||
String nuri = null;
|
||||
String lname = "dummyattr";
|
||||
e.removeAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_removeAttributeNS_String_String_2 extends BWBaseTest im
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -89,19 +89,11 @@ public class ElementImpl_removeAttributeNS_String_String_2 extends BWBaseTest im
|
||||
String nuri = "";
|
||||
String lname = null;
|
||||
e.removeAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... ");
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' didn't throw exception... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ElementImpl_removeAttributeNS_String_String_3 extends BWBaseTest im
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -88,27 +88,19 @@ public class ElementImpl_removeAttributeNS_String_String_3 extends BWBaseTest im
|
||||
} else {
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String lname = "dummyattr";
|
||||
e.setAttributeNS(nuri, lname, "1");
|
||||
e.removeAttributeNS(nuri, lname);
|
||||
TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
String msg = "UNSUPPORTED METHOD";
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException de) {
|
||||
String msg = "DOMException: " + de;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_0 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_0 extends BWBaseTes
|
||||
String lname = null;
|
||||
String val = null;
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
@@ -109,7 +103,6 @@ public class ElementImpl_setAttributeNS_String_String_String_0 extends BWBaseTes
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_1 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_1 extends BWBaseTes
|
||||
String lname = null;
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_2 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_2 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = null;
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_3 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_3 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_4 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_4 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = null;
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_5 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_5 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_6 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_6 extends BWBaseTes
|
||||
String lname = null;
|
||||
String val = null;
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_7 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_7 extends BWBaseTes
|
||||
String lname = null;
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_8 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,17 +91,11 @@ public class ElementImpl_setAttributeNS_String_String_String_8 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = null;
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
TestLoader.logErrPrint("setAttributeNS didn't throw exception ...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNS_String_String_String_9 extends BWBaseTes
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -91,25 +91,22 @@ public class ElementImpl_setAttributeNS_String_String_String_9 extends BWBaseTes
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
e.setAttributeNS(nuri, lname, val);
|
||||
TestLoader.logErrPrint("setAttributeNS is a unsupported method ...");
|
||||
return BWBaseTest.FAILED;
|
||||
String s = e.getAttributeNS(nuri, lname);
|
||||
if (s == null || !s.equals(val)) {
|
||||
TestLoader.logErrPrint("'setAttributeNS' didn't set attribute correctly");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ElementImpl_setAttributeNodeNS_Attr_0 extends BWBaseTest implements
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
@@ -88,17 +88,11 @@ public class ElementImpl_setAttributeNodeNS_Attr_0 extends BWBaseTest implements
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
Attr anode = e.setAttributeNodeNS(null);
|
||||
TestLoader.logErrPrint("Document setAttributeNodeNS is an unsupported method...");
|
||||
TestLoader.logErrPrint("Document setAttributeNodeNS didn't throw exception...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD ");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
@@ -75,45 +75,40 @@ public class ElementImpl_setAttributeNodeNS_Attr_1 extends BWBaseTest implements
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
|
||||
Attr a = d.createAttribute("dummyattr_5");
|
||||
if (a == null) {
|
||||
TestLoader.logErrPrint("Document createAttribute FAILED... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
//Element e = d.getDocumentElement();
|
||||
Element e = d.createElement("BODY");
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
Attr anode = e.setAttributeNodeNS(a);
|
||||
TestLoader.logErrPrint("Document setAttributeNodeNS is an unsupported method...");
|
||||
Element e = d.getDocumentElement();
|
||||
String nuri = "xmlns:edi='http://ecommerce.org/schema'";
|
||||
String lname = "dummyattr";
|
||||
String val = "1";
|
||||
Attr a = d.createAttribute(lname);
|
||||
a.setValue(val);
|
||||
if (e == null || a == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL or can't create new attribute..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
e.setAttributeNodeNS(a);
|
||||
Node n = e.getAttributeNodeNS(nuri, lname);
|
||||
if (n == null || n.getNodeType() != Node.ATTRIBUTE_NODE || !((Attr)n).getValue().equals(val)) {
|
||||
TestLoader.logErrPrint("Element 'getAttributeNS' returned incorrect value ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD ");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
} catch (Exception r) {
|
||||
String msg = "Caught Exception " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,44 +74,30 @@ public class NodeImpl_getLocalName extends BWBaseTest implements Execution
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
String str = n.getLocalName();
|
||||
TestLoader.logErrPrint("getLocalName is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
try {
|
||||
Node e = d.createElement(qname);
|
||||
String lname = ((Node)e).getLocalName();
|
||||
if (lname == null) { // || !lname.equals("body")) {
|
||||
TestLoader.logPrint("getLocalName() returned incorrect value: "+lname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("getLocalName(): Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
System.out.println("getLocalName(): Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,44 +74,31 @@ public class NodeImpl_getNamespaceURI extends BWBaseTest implements Execution
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
String str = n.getNamespaceURI();
|
||||
TestLoader.logErrPrint("getNameSpaceURI is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
try {
|
||||
Element e = d.createElement(qname);
|
||||
String uri = ((Node)e).getNamespaceURI();
|
||||
if (uri == null) { // || !uri.equals(nsuri)) {
|
||||
TestLoader.logPrint("getNamespaceURI() returned incorrect value: "+uri);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
124
mozilla/java/dom/tests/src/api/NodeImpl_getPrefix_0.java
Normal file
124
mozilla/java/dom/tests/src/api/NodeImpl_getPrefix_0.java
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class NodeImpl_getPrefix_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public NodeImpl_getPrefix_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
try {
|
||||
Node e = d.createElement(qname);
|
||||
String prefix = ((Node)e).getPrefix();
|
||||
if (prefix != null && !prefix.equals("")) {
|
||||
TestLoader.logPrint("getPrefix() returned incorrect value: "+prefix);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("getPrefix(): Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("getPrefix(): Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
126
mozilla/java/dom/tests/src/api/NodeImpl_getPrefix_1.java
Normal file
126
mozilla/java/dom/tests/src/api/NodeImpl_getPrefix_1.java
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class NodeImpl_getPrefix_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public NodeImpl_getPrefix_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
try {
|
||||
Element e = d.createElement(qname);
|
||||
e.setPrefix("edi");
|
||||
String prefix = ((Node)e).getPrefix();
|
||||
if (prefix == null || !prefix.equals("edi")) {
|
||||
TestLoader.logPrint("getPrefix() returned incorrect value: "+prefix);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("getPrefix(): Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("getPrefix(): Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* 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 {}
|
||||
}
|
||||
}
|
||||
@@ -75,42 +75,30 @@ public class NodeImpl_setPrefix_String_0 extends BWBaseTest implements Execution
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String name = "nom";
|
||||
Attr a = d.createAttribute(name);
|
||||
if (a == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could Not create Attribute " + name);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
try {
|
||||
Node e = d.createElement(qname);
|
||||
((Node)e).setPrefix(null);
|
||||
TestLoader.logPrint("getPrefix() didn't throw exception");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
String newval = null;
|
||||
a.setPrefix(newval);
|
||||
TestLoader.logErrPrint("setPrefix is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,42 +75,32 @@ public class NodeImpl_setPrefix_String_1 extends BWBaseTest implements Execution
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
try {
|
||||
String name = "nom";
|
||||
Attr a = d.createAttribute(name);
|
||||
if (a == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could Not create Attribute " + name);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String newval = "xml";
|
||||
a.setPrefix(newval);
|
||||
TestLoader.logErrPrint("setPrefix is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (DOMException e) {
|
||||
TestLoader.logErrPrint("Caught DOMException");
|
||||
return BWBaseTest.PASSED;
|
||||
} catch (RuntimeException r) {
|
||||
String msg = "Caught RuntimeException " + r ;
|
||||
TestLoader.logErrPrint(msg);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
String nsuri = "xmlns:edi='http://ec.com/schema'";
|
||||
String qname = "body";
|
||||
String prefix = "edi";
|
||||
try {
|
||||
Node e = d.createElement(qname);
|
||||
((Node)e).setPrefix(prefix);
|
||||
if (!((Node)e).getPrefix().equals(prefix)) {
|
||||
TestLoader.logPrint("getPrefix returned incorrect value");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,41 +74,22 @@ public class NodeImpl_supports_String_String_0 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
try {
|
||||
String feature = null;
|
||||
String ver = null;
|
||||
if (n.supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports is an unsupported method...");
|
||||
if (((Node)d).supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports didn't throw exception...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
@@ -74,41 +74,23 @@ public class NodeImpl_supports_String_String_1 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
try {
|
||||
String feature = null;
|
||||
String ver = "2.0";
|
||||
if (n.supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports is an unsupported method...");
|
||||
if (((Node)d).supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports didn't throw exception...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
|
||||
@@ -74,46 +74,29 @@ public class NodeImpl_supports_String_String_2 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
try {
|
||||
String feature = "xml";
|
||||
String ver = null;
|
||||
if (n.supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (((Node)d).supports(feature, ver) == false) {
|
||||
TestLoader.logErrPrint("Node.supports returned incorrect value");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -74,46 +74,30 @@ public class NodeImpl_supports_String_String_3 extends BWBaseTest implements Exe
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
setUnsupported();
|
||||
|
||||
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String elname = "SCRIPT";
|
||||
Element e = d.createElement(elname);
|
||||
if (e == null)
|
||||
{
|
||||
TestLoader.logErrPrint("Could not create Element " + elname);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String nodename = "HEAD";
|
||||
NodeList nl = d.getElementsByTagName(nodename);
|
||||
if (nl != null)
|
||||
{
|
||||
int len = nl.getLength();
|
||||
|
||||
Node n = nl.item(0);
|
||||
try {
|
||||
try {
|
||||
String feature = "xml";
|
||||
String ver = "2.0";
|
||||
if (n.supports(feature, ver)) {};
|
||||
TestLoader.logErrPrint("Node.supports is an unsupported method...");
|
||||
return BWBaseTest.FAILED;
|
||||
} catch (UnsupportedOperationException ue) {
|
||||
TestLoader.logErrPrint("UNSUPPORTED METHOD");
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
} else {
|
||||
TestLoader.logErrPrint("Could not find Node " + nodename);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
String ver = "1.0";
|
||||
if (((Node)d).supports(feature, ver) == false) {
|
||||
TestLoader.logErrPrint("Node.supports returned incorrect value...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TestLoader.logErrPrint("Exception: "+e);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user