From ca6ac3335bb0a5ac1651909e8a628ab32d90fdf0 Mon Sep 17 00:00:00 2001 From: "rpallath%eng.sun.com" Date: Wed, 16 Feb 2000 22:58:27 +0000 Subject: [PATCH] New Test Cases for all UNSUPPORTED methods git-svn-id: svn://10.0.0.236/trunk@61142 18797224-902f-48f8-a5cc-f745e15eee43 --- .../src/api/AttrImpl_getOwnerElement.java | 124 ++++++++++++ ...teDocumentType_String_String_String_0.java | 131 +++++++++++++ ...entType_String_String_String_String_0.java | 131 +++++++++++++ ...Document_String_String_DocumentType_0.java | 135 +++++++++++++ ...mpl_createAttributeNS_String_String_0.java | 123 ++++++++++++ ...mpl_createAttributeNS_String_String_1.java | 125 ++++++++++++ ...mpl_createAttributeNS_String_String_2.java | 125 ++++++++++++ ...mpl_createAttributeNS_String_String_3.java | 125 ++++++++++++ ...tImpl_createElementNS_String_String_0.java | 125 ++++++++++++ ...tImpl_createElementNS_String_String_1.java | 125 ++++++++++++ ...tImpl_createElementNS_String_String_2.java | 125 ++++++++++++ ...tImpl_createElementNS_String_String_3.java | 125 ++++++++++++ .../DocumentImpl_createEvent_String_0.java | 122 ++++++++++++ .../DocumentImpl_createEvent_String_1.java | 121 ++++++++++++ .../DocumentImpl_getElementById_String_0.java | 120 ++++++++++++ .../DocumentImpl_getElementById_String_1.java | 120 ++++++++++++ ...etElementsByTagNameNS_String_String_0.java | 121 ++++++++++++ ...etElementsByTagNameNS_String_String_1.java | 121 ++++++++++++ ...etElementsByTagNameNS_String_String_2.java | 121 ++++++++++++ ...etElementsByTagNameNS_String_String_3.java | 121 ++++++++++++ ...ocumentImpl_importNode_Node_boolean_0.java | 125 ++++++++++++ ...ocumentImpl_importNode_Node_boolean_1.java | 125 ++++++++++++ ...ocumentImpl_importNode_Node_boolean_2.java | 137 +++++++++++++ ...ocumentImpl_importNode_Node_boolean_3.java | 137 +++++++++++++ .../DocumentTypeImpl_getInternalSubset.java | 128 +++++++++++++ .../src/api/DocumentTypeImpl_getPublicId.java | 128 +++++++++++++ .../src/api/DocumentTypeImpl_getSystemId.java | 128 +++++++++++++ ...ntImpl_getAttributeNS_String_String_0.java | 135 +++++++++++++ ...ntImpl_getAttributeNS_String_String_1.java | 135 +++++++++++++ ...ntImpl_getAttributeNS_String_String_2.java | 135 +++++++++++++ ...ntImpl_getAttributeNS_String_String_3.java | 135 +++++++++++++ ...pl_getAttributeNodeNS_String_String_0.java | 135 +++++++++++++ ...pl_getAttributeNodeNS_String_String_1.java | 135 +++++++++++++ ...pl_getAttributeNodeNS_String_String_2.java | 135 +++++++++++++ ...pl_getAttributeNodeNS_String_String_3.java | 135 +++++++++++++ ...etElementsByTagNameNS_String_String_0.java | 135 +++++++++++++ ...etElementsByTagNameNS_String_String_1.java | 135 +++++++++++++ ...etElementsByTagNameNS_String_String_2.java | 135 +++++++++++++ ...etElementsByTagNameNS_String_String_3.java | 135 +++++++++++++ ...mpl_removeAttributeNS_String_String_0.java | 135 +++++++++++++ ...mpl_removeAttributeNS_String_String_1.java | 135 +++++++++++++ ...mpl_removeAttributeNS_String_String_2.java | 135 +++++++++++++ ...mpl_removeAttributeNS_String_String_3.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_0.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_1.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_2.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_3.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_4.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_5.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_6.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_7.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_8.java | 135 +++++++++++++ ...setAttributeNS_String_String_String_9.java | 135 +++++++++++++ ...ElementImpl_setAttributeNodeNS_Attr_0.java | 132 +++++++++++++ ...ElementImpl_setAttributeNodeNS_Attr_1.java | 140 ++++++++++++++ .../ElementImpl_setAttributeNode_Attr_2.java | 157 +++++++++++++++ ...apImpl_getNamedItemNS_String_String_0.java | 152 +++++++++++++++ ...apImpl_getNamedItemNS_String_String_1.java | 152 +++++++++++++++ ...apImpl_getNamedItemNS_String_String_2.java | 152 +++++++++++++++ ...apImpl_getNamedItemNS_String_String_3.java | 152 +++++++++++++++ ...mpl_removeNamedItemNS_String_String_0.java | 156 +++++++++++++++ ...mpl_removeNamedItemNS_String_String_1.java | 156 +++++++++++++++ ...mpl_removeNamedItemNS_String_String_2.java | 156 +++++++++++++++ ...mpl_removeNamedItemNS_String_String_3.java | 152 +++++++++++++++ ...amedNodeMapImpl_setNamedItemNS_Node_0.java | 157 +++++++++++++++ ...amedNodeMapImpl_setNamedItemNS_Node_1.java | 166 ++++++++++++++++ .../NamedNodeMapImpl_setNamedItem_Node_2.java | 180 ++++++++++++++++++ .../tests/src/api/NodeImpl_getLocalName.java | 138 ++++++++++++++ .../src/api/NodeImpl_getNamespaceURI.java | 137 +++++++++++++ .../dom/tests/src/api/NodeImpl_getPrefix.java | 138 ++++++++++++++ .../dom/tests/src/api/NodeImpl_normalize.java | 137 +++++++++++++ .../src/api/NodeImpl_setPrefix_String_0.java | 136 +++++++++++++ .../src/api/NodeImpl_setPrefix_String_1.java | 136 +++++++++++++ .../NodeImpl_supports_String_String_0.java | 140 ++++++++++++++ .../NodeImpl_supports_String_String_1.java | 140 ++++++++++++++ .../NodeImpl_supports_String_String_2.java | 140 ++++++++++++++ .../NodeImpl_supports_String_String_3.java | 140 ++++++++++++++ 77 files changed, 10446 insertions(+) create mode 100755 mozilla/java/dom/tests/src/api/AttrImpl_getOwnerElement.java create mode 100644 mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_0.java create mode 100644 mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_String_0.java create mode 100644 mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocument_String_String_DocumentType_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_0.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_1.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_2.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_3.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentTypeImpl_getInternalSubset.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentTypeImpl_getPublicId.java create mode 100755 mozilla/java/dom/tests/src/api/DocumentTypeImpl_getSystemId.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_4.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_5.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_6.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_7.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_8.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_9.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_0.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_1.java create mode 100755 mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNode_Attr_2.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_3.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_0.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_1.java create mode 100755 mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItem_Node_2.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_getLocalName.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_getNamespaceURI.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_getPrefix.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_normalize.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_0.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_1.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_2.java create mode 100755 mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_3.java diff --git a/mozilla/java/dom/tests/src/api/AttrImpl_getOwnerElement.java b/mozilla/java/dom/tests/src/api/AttrImpl_getOwnerElement.java new file mode 100755 index 00000000000..0168c0baafd --- /dev/null +++ b/mozilla/java/dom/tests/src/api/AttrImpl_getOwnerElement.java @@ -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 AttrImpl_getOwnerElement extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public AttrImpl_getOwnerElement() + { + } + + + /** + * + *********************************************************** + * 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); + 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.."); + return BWBaseTest.FAILED; + } else { + try { + Element e = a.getOwnerElement(); + TestLoader.logErrPrint("Attr 'getOwnerElement()' is not a supported method ..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD"; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_0.java b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_0.java new file mode 100644 index 00000000000..f13cf9b8ed4 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_0.java @@ -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_createDocumentType_String_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DOMImplementationImpl_createDocumentType_String_String_String_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.logErrPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + 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 { + if (di.createDocumentType(null, null, null) == null) { + System.out.println("DomImplementation 'createDocumentType(null, null, null) according to specs. is not supported..."); + 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; + + } + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_String_0.java b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_String_0.java new file mode 100644 index 00000000000..144bc3db7ca --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocumentType_String_String_String_String_0.java @@ -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_createDocumentType_String_String_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DOMImplementationImpl_createDocumentType_String_String_String_String_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.logErrPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + 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 { + if (di.createDocumentType(null, null, null) == null) { + System.out.println("DomImplementation 'createDocumentType(null, null, null, null) according to specs. is not supported..."); + return BWBaseTest.FAILED; + + } else { + System.out.println("DomImplementation 'createDocumentType(null, null, null, null)' according to specs is not supported..."); + } + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD "; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + + } + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocument_String_String_DocumentType_0.java b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocument_String_String_DocumentType_0.java new file mode 100644 index 00000000000..d55313ba527 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DOMImplementationImpl_createDocument_String_String_DocumentType_0.java @@ -0,0 +1,135 @@ + +/* + 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_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DOMImplementationImpl_createDocument_String_String_DocumentType_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.logErrPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + 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 { + if (di.createDocument(null, null, null) == null) { + System.out.println("DomImplementation 'createDocument' according to specs. is not supported..."); + 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; + } + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_0.java new file mode 100755 index 00000000000..fd879ac570e --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_0.java @@ -0,0 +1,123 @@ +/* + 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_createAttributeNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createAttributeNS_String_String_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); + setUnsupported(); + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = null; + Attr a = d.createAttributeNS(nuri, qname); + TestLoader.logErrPrint("createAttributeNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_1.java new file mode 100755 index 00000000000..84ff0e0a9cf --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_1.java @@ -0,0 +1,125 @@ + +/* + 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_createAttributeNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = ""; + String qname = null; + Attr a = d.createAttributeNS(nuri, qname); + TestLoader.logErrPrint("createAttributeNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_2.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_2.java new file mode 100755 index 00000000000..466a446ae24 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_2.java @@ -0,0 +1,125 @@ + +/* + 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_createAttributeNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = "xml"; + Attr a = d.createAttributeNS(nuri, qname); + TestLoader.logErrPrint("createAttributeNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_3.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_3.java new file mode 100755 index 00000000000..9fab1b14685 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createAttributeNS_String_String_3.java @@ -0,0 +1,125 @@ + +/* + 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_createAttributeNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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"; + Attr a = d.createAttributeNS(nuri, qname); + TestLoader.logErrPrint("createAttributeNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_0.java new file mode 100755 index 00000000000..c4f486b0ec2 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_0.java @@ -0,0 +1,125 @@ + +/* + 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_createElementNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createElementNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = null; + Element e = d.createElementNS(nuri, qname); + TestLoader.logErrPrint("createElementNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTEd METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_1.java new file mode 100755 index 00000000000..c4cd39d46ce --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_1.java @@ -0,0 +1,125 @@ + +/* + 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_createElementNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createElementNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = ""; + String qname = null; + Element e = d.createElementNS(nuri, qname); + TestLoader.logErrPrint("createElementNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTEd METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_2.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_2.java new file mode 100755 index 00000000000..282a9e516bd --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_2.java @@ -0,0 +1,125 @@ + +/* + 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_createElementNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createElementNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = "xml"; + Element e = d.createElementNS(nuri, qname); + TestLoader.logErrPrint("createElementNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTEd METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_3.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_3.java new file mode 100755 index 00000000000..0bd6f7b2791 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createElementNS_String_String_3.java @@ -0,0 +1,125 @@ + +/* + 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_createElementNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createElementNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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"; + Element e = d.createElementNS(nuri, qname); + TestLoader.logErrPrint("createElementNS is a unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTEd METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_0.java new file mode 100755 index 00000000000..7ff46e1316b --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_0.java @@ -0,0 +1,122 @@ + +/* + 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_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createEvent_String_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); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + 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); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_1.java new file mode 100755 index 00000000000..ec74021a9c2 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_createEvent_String_1.java @@ -0,0 +1,121 @@ + +/* + 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_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_createEvent_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + try { + Event e = d.createEvent("CLICK"); + TestLoader.logErrPrint("DocumentEvent is not a supported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD "; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_0.java new file mode 100755 index 00000000000..dbd3c3bcfd3 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_0.java @@ -0,0 +1,120 @@ +/* + 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_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementById_String_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); + 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; + + } catch ( UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD"; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_1.java new file mode 100755 index 00000000000..82118391afd --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementById_String_1.java @@ -0,0 +1,120 @@ +/* + 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_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementById_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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"); + return BWBaseTest.FAILED; + + } catch ( UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD"; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_0.java new file mode 100755 index 00000000000..fb9a3c3c86e --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_0.java @@ -0,0 +1,121 @@ +/* + 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_getElementsByTagNameNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementsByTagNameNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = null; + 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); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_1.java new file mode 100755 index 00000000000..1c7f983a8fc --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_1.java @@ -0,0 +1,121 @@ +/* + 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_getElementsByTagNameNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = null; + String qname = "xml"; + 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); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_2.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_2.java new file mode 100755 index 00000000000..2e422c1e250 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_2.java @@ -0,0 +1,121 @@ +/* + 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_getElementsByTagNameNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String nuri = ""; + String qname = null; + 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); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_3.java b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_3.java new file mode 100755 index 00000000000..e432133874f --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_getElementsByTagNameNS_String_String_3.java @@ -0,0 +1,121 @@ +/* + 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_getElementsByTagNameNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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"; + 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); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_0.java b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_0.java new file mode 100755 index 00000000000..5d33940c700 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_0.java @@ -0,0 +1,125 @@ + +/* + 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_importNode_Node_boolean_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_importNode_Node_boolean_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); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + try { + + Node n= d.importNode(null, false); + TestLoader.logErrPrint("Document 'importNode(null,false) is not supported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD " ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "Caught DOMException " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_1.java b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_1.java new file mode 100755 index 00000000000..8bab13bb4e7 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_1.java @@ -0,0 +1,125 @@ + +/* + 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_importNode_Node_boolean_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_importNode_Node_boolean_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); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + try { + + Node n= d.importNode(null, true); + TestLoader.logErrPrint("Document 'importNode(null,true) is not supported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD " ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "Caught DOMException " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_2.java b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_2.java new file mode 100755 index 00000000000..d500d3e913b --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_2.java @@ -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 DocumentImpl_importNode_Node_boolean_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_importNode_Node_boolean_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); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + Element e = null; + try { + e = d.createElement("HR"); + if (e == null) { + TestLoader.logErrPrint("Document 'createElement(HR) is NULL.."); + return BWBaseTest.FAILED; + } + } catch (Exception ex) { + String msg = "createElement Exception:" + ex ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + + try { + Node n= d.importNode(e, false); + TestLoader.logErrPrint("Document 'importNode(null,false) is not supported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD " ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "Caught DOMException " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_3.java b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_3.java new file mode 100755 index 00000000000..b66028c264f --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentImpl_importNode_Node_boolean_3.java @@ -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 DocumentImpl_importNode_Node_boolean_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentImpl_importNode_Node_boolean_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + DocumentImpl d = (DocumentImpl)tobj; + if (d != null) + { + Element e = null; + try { + e = d.createElement("HR"); + if (e == null) { + TestLoader.logErrPrint("Document 'createElement(HR) is NULL.."); + return BWBaseTest.FAILED; + } + } catch (Exception ex) { + String msg = "createElement Exception:" + ex ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + + try { + Node n= d.importNode(e, true); + TestLoader.logErrPrint("Document 'importNode(null,false) is not supported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + String msg = "UNSUPPORTED METHOD " ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "Caught DOMException " + de; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getInternalSubset.java b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getInternalSubset.java new file mode 100755 index 00000000000..9f18919b76d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getInternalSubset.java @@ -0,0 +1,128 @@ +/* + 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 DocumentTypeImpl_getInternalSubset extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentTypeImpl_getInternalSubset() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + DocumentType dt = d.getDoctype(); + 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 ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getPublicId.java b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getPublicId.java new file mode 100755 index 00000000000..c612a31852f --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getPublicId.java @@ -0,0 +1,128 @@ +/* + 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 DocumentTypeImpl_getPublicId extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentTypeImpl_getPublicId() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + DocumentType dt = d.getDoctype(); + 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 ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getSystemId.java b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getSystemId.java new file mode 100755 index 00000000000..a72312b89ce --- /dev/null +++ b/mozilla/java/dom/tests/src/api/DocumentTypeImpl_getSystemId.java @@ -0,0 +1,128 @@ +/* + 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 DocumentTypeImpl_getSystemId extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public DocumentTypeImpl_getSystemId() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + DocumentType dt = d.getDoctype(); + 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 ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_0.java new file mode 100755 index 00000000000..c0c3a0bb8a7 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_0.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + String s = e.getAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_1.java new file mode 100755 index 00000000000..b4e8474d768 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_1.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + String s = e.getAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_2.java new file mode 100755 index 00000000000..e4158568b9b --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_2.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = ""; + String lname = null; + String s = e.getAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_3.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_3.java new file mode 100755 index 00000000000..12d212317c7 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNS_String_String_3.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + String s = e.getAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_0.java new file mode 100755 index 00000000000..e8058062d23 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_0.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNodeNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNodeNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + Node n = e.getAttributeNodeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_1.java new file mode 100755 index 00000000000..0cfd924165a --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_1.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNodeNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNodeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + Node n = e.getAttributeNodeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_2.java new file mode 100755 index 00000000000..316c5553023 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_2.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNodeNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNodeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = ""; + String lname = null; + Node n = e.getAttributeNodeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNodeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_3.java b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_3.java new file mode 100755 index 00000000000..288ae0a63f8 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getAttributeNodeNS_String_String_3.java @@ -0,0 +1,135 @@ +/* + 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_getAttributeNodeNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getAttributeNodeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + Node n = e.getAttributeNodeNS(nuri, lname); + TestLoader.logErrPrint("Element 'getAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_0.java new file mode 100755 index 00000000000..0efd5226296 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_0.java @@ -0,0 +1,135 @@ +/* + 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_getElementsByTagNameNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getElementsByTagNameNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + NodeList nl = e.getElementsByTagNameNS(nuri, lname); + TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_1.java new file mode 100755 index 00000000000..0522705381e --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_1.java @@ -0,0 +1,135 @@ +/* + 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_getElementsByTagNameNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + NodeList nl = e.getElementsByTagNameNS(nuri, lname); + TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_2.java new file mode 100755 index 00000000000..a7e4adce41b --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_2.java @@ -0,0 +1,135 @@ +/* + 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_getElementsByTagNameNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = ""; + String lname = null; + NodeList nl = e.getElementsByTagNameNS(nuri, lname); + TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_3.java b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_3.java new file mode 100755 index 00000000000..b5de4a6096e --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_getElementsByTagNameNS_String_String_3.java @@ -0,0 +1,135 @@ +/* + 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_getElementsByTagNameNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_getElementsByTagNameNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + NodeList nl = e.getElementsByTagNameNS(nuri, lname); + TestLoader.logErrPrint("Element 'getElementsByTagNameNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_0.java new file mode 100755 index 00000000000..0b4cc9e1cb1 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_0.java @@ -0,0 +1,135 @@ +/* + 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_removeAttributeNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_removeAttributeNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + e.removeAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_1.java new file mode 100755 index 00000000000..d990628bad7 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_1.java @@ -0,0 +1,135 @@ +/* + 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_removeAttributeNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_removeAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + e.removeAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_2.java new file mode 100755 index 00000000000..027ade31cfd --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_2.java @@ -0,0 +1,135 @@ +/* + 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_removeAttributeNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_removeAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = ""; + String lname = null; + e.removeAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_3.java b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_3.java new file mode 100755 index 00000000000..a46b9ef706d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_removeAttributeNS_String_String_3.java @@ -0,0 +1,135 @@ +/* + 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_removeAttributeNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_removeAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + e.removeAttributeNS(nuri, lname); + TestLoader.logErrPrint("Element 'removeAttributeNS' is not a supported method... "); + 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 ; + TestLoader.logErrPrint(msg); + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_0.java new file mode 100755 index 00000000000..da4577481b8 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_0.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + String val = null; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_1.java new file mode 100755 index 00000000000..e77a9da15f8 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_1.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = null; + String val = "1"; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_2.java new file mode 100755 index 00000000000..61542797ebb --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_2.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + String val = null; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_3.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_3.java new file mode 100755 index 00000000000..b072eea5e9d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_3.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + String val = "1"; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_4.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_4.java new file mode 100755 index 00000000000..deb9ebbf069 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_4.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_4 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + String val = null; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_5.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_5.java new file mode 100755 index 00000000000..19b68f94ed1 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_5.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_5 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_5() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = null; + String lname = "dummyattr"; + String val = "1"; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_6.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_6.java new file mode 100755 index 00000000000..dcbaf7ad95a --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_6.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_6 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_6() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = null; + String val = null; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_7.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_7.java new file mode 100755 index 00000000000..2740aff5776 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_7.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_7 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_7() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = null; + String val = "1"; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_8.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_8.java new file mode 100755 index 00000000000..c28bdfadba2 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_8.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_8 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_8() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + String val = null; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_9.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_9.java new file mode 100755 index 00000000000..33f37eeffb7 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNS_String_String_String_9.java @@ -0,0 +1,135 @@ + +/* + 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_setAttributeNS_String_String_String_9 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNS_String_String_String_9() + { + } + + + /** + * + *********************************************************** + * 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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String lname = "dummyattr"; + String val = "1"; + e.setAttributeNS(nuri, lname, val); + TestLoader.logErrPrint("setAttributeNS is a 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_0.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_0.java new file mode 100755 index 00000000000..eee54dee25d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_0.java @@ -0,0 +1,132 @@ + +/* + 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_setAttributeNodeNS_Attr_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNodeNS_Attr_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + Attr anode = e.setAttributeNodeNS(null); + TestLoader.logErrPrint("Document setAttributeNodeNS 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_1.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_1.java new file mode 100755 index 00000000000..4a0780fc1c4 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNodeNS_Attr_1.java @@ -0,0 +1,140 @@ + +/* + 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_setAttributeNodeNS_Attr_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNodeNS_Attr_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); + 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..."); + 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNode_Attr_2.java b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNode_Attr_2.java new file mode 100755 index 00000000000..8854327b6a2 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/ElementImpl_setAttributeNode_Attr_2.java @@ -0,0 +1,157 @@ + +/* + 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_setAttributeNode_Attr_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_setAttributeNode_Attr_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 { + Attr oldattr = d.createAttribute("dummyattr_5"); + if (oldattr == null) { + TestLoader.logErrPrint("Document createAttribute FAILED... "); + return BWBaseTest.FAILED; + } + + Attr newattr = d.createAttribute("dummyattr_5"); + if (newattr == 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.setAttributeNode(oldattr); + if (anode != null) + { + TestLoader.logErrPrint("Element 'setAttributeNode(dummyattr_5) FAILED... "); + return BWBaseTest.FAILED; + } + + Attr nnode = e.setAttributeNode(newattr); + if (!(nnode.equals(oldattr))) + { + TestLoader.logErrPrint("Element 'setAttributeNode(dummyattr_5) FAILED... "); + return BWBaseTest.FAILED; + } + + + if (e.getAttributeNode("dummyattr_5") == null) { + TestLoader.logErrPrint("Element 'setAttributeNode(dummyattr_5) FAILED... "); + return BWBaseTest.FAILED; + } + } + } catch (DOMException e) { + TestLoader.logErrPrint("Caught DOMException"); + return BWBaseTest.FAILED; + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_0.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_0.java new file mode 100755 index 00000000000..3e3d8a05a57 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_0.java @@ -0,0 +1,152 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is mozilla.org code. + + The Initial Developer of the Original Code is Sun Microsystems, + Inc. Portions created by Sun are + Copyright (C) 1999 Sun Microsystems, Inc. All + Rights Reserved. + + 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 NamedNodeMapImpl_getNamedItemNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_getNamedItemNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = null; + String name = null; + Node n = map.getNamedItemNS(nuri, name); + TestLoader.logErrPrint(" getNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_1.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_1.java new file mode 100755 index 00000000000..993e4ee9707 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_1.java @@ -0,0 +1,152 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is mozilla.org code. + + The Initial Developer of the Original Code is Sun Microsystems, + Inc. Portions created by Sun are + Copyright (C) 1999 Sun Microsystems, Inc. All + Rights Reserved. + + 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 NamedNodeMapImpl_getNamedItemNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_getNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = null; + String name = "TARGET"; + Node n = map.getNamedItemNS(nuri, name); + TestLoader.logErrPrint(" getNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_2.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_2.java new file mode 100755 index 00000000000..e5e8e37be8a --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_2.java @@ -0,0 +1,152 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is mozilla.org code. + + The Initial Developer of the Original Code is Sun Microsystems, + Inc. Portions created by Sun are + Copyright (C) 1999 Sun Microsystems, Inc. All + Rights Reserved. + + 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 NamedNodeMapImpl_getNamedItemNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_getNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = "xmlns:edi='http://ecommerce.org/schema'"; + String name = null; + Node n = map.getNamedItemNS(nuri, name); + TestLoader.logErrPrint(" getNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_3.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_3.java new file mode 100755 index 00000000000..07542c608dc --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_getNamedItemNS_String_String_3.java @@ -0,0 +1,152 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is mozilla.org code. + + The Initial Developer of the Original Code is Sun Microsystems, + Inc. Portions created by Sun are + Copyright (C) 1999 Sun Microsystems, Inc. All + Rights Reserved. + + 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 NamedNodeMapImpl_getNamedItemNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_getNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = "xmlns:edi='http://ecommerce.org/schema'" ; + String name = "TARGET"; + Node n = map.getNamedItemNS(nuri, name); + TestLoader.logErrPrint(" getNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_0.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_0.java new file mode 100755 index 00000000000..b7842530d16 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_0.java @@ -0,0 +1,156 @@ +/* + 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 NamedNodeMapImpl_removeNamedItemNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_removeNamedItemNS_String_String_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = null; + String name = null; + Node n = map.removeNamedItemNS(nuri, name); + TestLoader.logErrPrint(" removeNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_1.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_1.java new file mode 100755 index 00000000000..b6fc0740a64 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_1.java @@ -0,0 +1,156 @@ +/* + 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 NamedNodeMapImpl_removeNamedItemNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_removeNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = null; + String name = "TARGET"; + Node n = map.removeNamedItemNS(nuri, name); + TestLoader.logErrPrint(" removeNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_2.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_2.java new file mode 100755 index 00000000000..3cd2acfcad8 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_2.java @@ -0,0 +1,156 @@ +/* + 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 NamedNodeMapImpl_removeNamedItemNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_removeNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = "xmlns:edi='http://ecommerce.org/schema'" ; + String name = "TARGET"; + Node n = map.removeNamedItemNS(nuri, name); + TestLoader.logErrPrint(" removeNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException : " + de; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_3.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_3.java new file mode 100755 index 00000000000..6cd467c2c09 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_removeNamedItemNS_String_String_3.java @@ -0,0 +1,152 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is mozilla.org code. + + The Initial Developer of the Original Code is Sun Microsystems, + Inc. Portions created by Sun are + Copyright (C) 1999 Sun Microsystems, Inc. All + Rights Reserved. + + 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 NamedNodeMapImpl_removeNamedItemNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_removeNamedItemNS_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + String os = System.getProperty("OS"); + osRoutine(os); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + String nuri = "xmlns:edi='http://ecommerce.org/schema'" ; + String name = "TARGET"; + Node n = map.removeNamedItemNS(nuri, name); + TestLoader.logErrPrint(" removeNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_0.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_0.java new file mode 100755 index 00000000000..dfc33b907b1 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_0.java @@ -0,0 +1,157 @@ + +/* + 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 NamedNodeMapImpl_setNamedItemNS_Node_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_setNamedItemNS_Node_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not reate Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + Node n = map.setNamedItemNS(null); + TestLoader.logErrPrint(" setNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTEd METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException: " + de; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } 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 { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_1.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_1.java new file mode 100755 index 00000000000..a750ceedde1 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItemNS_Node_1.java @@ -0,0 +1,166 @@ +/* + 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 NamedNodeMapImpl_setNamedItemNS_Node_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_setNamedItemNS_Node_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); + setUnsupported(); + + + Document d = (Document)tobj; + if (d != null) + { + try { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not create Attribute " + attrName); + return BWBaseTest.FAILED; + } + + attrName = "HREF"; + Attr ha = d.createAttribute(attrName); + if (ha == null) { + TestLoader.logErrPrint("Could not create Attribute " + attrName); + return BWBaseTest.FAILED; + } + + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + try { + Node newnode = ha; + Node n = map.setNamedItemNS(newnode); + TestLoader.logErrPrint(" setNamedItemNS is an unsupported method..."); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } catch (DOMException de) { + String msg = "DOMException: " + de; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (DOMException e) { + TestLoader.logErrPrint("Caught DOMException"); + return BWBaseTest.FAILED; + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItem_Node_2.java b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItem_Node_2.java new file mode 100755 index 00000000000..7851417061d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NamedNodeMapImpl_setNamedItem_Node_2.java @@ -0,0 +1,180 @@ +/* + 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 NamedNodeMapImpl_setNamedItem_Node_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NamedNodeMapImpl_setNamedItem_Node_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 { + String attrName = "TARGET"; + Attr a = d.createAttribute(attrName); + if (a == null) { + TestLoader.logErrPrint("Could not create Attribute " + attrName); + return BWBaseTest.FAILED; + } + + attrName = "HREF"; + Attr ha = d.createAttribute(attrName); + if (ha == null) { + TestLoader.logErrPrint("Could not create Attribute " + attrName); + return BWBaseTest.FAILED; + } + + attrName = "HREF"; + Attr newattr = d.createAttribute(attrName); + if (newattr == null) { + TestLoader.logErrPrint("Could not create Attribute " + attrName); + return BWBaseTest.FAILED; + } + + String aelement = "BASE"; + String attrValue = ""; + Element e = d.createElement(aelement); + if (e != null) + { + a.setValue(attrValue); + e.setAttributeNode(a); + } else { + TestLoader.logErrPrint("Element " + aelement + " could not be created..."); + return BWBaseTest.FAILED; + } + + NamedNodeMap map = e.getAttributes(); + if (map != null) + { + Node newnode = ha; + Node n = map.setNamedItem(newnode); + if (n != null) + { + TestLoader.logErrPrint(" Return value should null on setting namedItem for Node " + attrName); + return BWBaseTest.FAILED; + } + + Node samenode = newattr; + Node nn = map.setNamedItem(newnode); + if (nn == null) + { + TestLoader.logErrPrint(" Return value cannot be null on setting namedItem for Node " + attrName); + return BWBaseTest.FAILED; + } + + if (newnode.getNodeName().compareTo(nn.getNodeName()) != 0) + { + TestLoader.logErrPrint(" setNamedItem return node " + newnode.getNodeName() + " is different from original node " + attrName); + return BWBaseTest.FAILED; + } + + } else { + TestLoader.logErrPrint(" Could not find Attriblist for node " + aelement); + return BWBaseTest.FAILED; + } + } catch (DOMException e) { + TestLoader.logErrPrint("Caught DOMException"); + return BWBaseTest.FAILED; + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.FAILED; + } + } else { + TestLoader.logErrPrint("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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_getLocalName.java b/mozilla/java/dom/tests/src/api/NodeImpl_getLocalName.java new file mode 100755 index 00000000000..2e50b07760d --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_getLocalName.java @@ -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 NodeImpl_getLocalName extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_getLocalName() + { + } + + + /** + * + *********************************************************** + * 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); + 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_getNamespaceURI.java b/mozilla/java/dom/tests/src/api/NodeImpl_getNamespaceURI.java new file mode 100755 index 00000000000..d068dea9c1f --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_getNamespaceURI.java @@ -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 NodeImpl_getNamespaceURI extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_getNamespaceURI() + { + } + + + /** + * + *********************************************************** + * 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); + 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_getPrefix.java b/mozilla/java/dom/tests/src/api/NodeImpl_getPrefix.java new file mode 100755 index 00000000000..191f110af02 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_getPrefix.java @@ -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 NodeImpl_getPrefix extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_getPrefix() + { + } + + + /** + * + *********************************************************** + * 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); + 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.getPrefix(); + TestLoader.logErrPrint("getPrefix 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_normalize.java b/mozilla/java/dom/tests/src/api/NodeImpl_normalize.java new file mode 100755 index 00000000000..08ccf9e26be --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_normalize.java @@ -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 NodeImpl_normalize extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_normalize() + { + } + + + /** + * + *********************************************************** + * 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); + 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 { + n.normalize(); + TestLoader.logErrPrint("normalize 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_0.java b/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_0.java new file mode 100755 index 00000000000..6863fec3200 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_0.java @@ -0,0 +1,136 @@ + +/* + 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_setPrefix_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_setPrefix_String_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); + 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 = 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; + } + + } + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_1.java b/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_1.java new file mode 100755 index 00000000000..fff5e40deb8 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_setPrefix_String_1.java @@ -0,0 +1,136 @@ + +/* + 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_setPrefix_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_setPrefix_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_0.java b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_0.java new file mode 100755 index 00000000000..2539e4493c3 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_0.java @@ -0,0 +1,140 @@ +/* + 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_supports_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_supports_String_String_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); + 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 feature = null; + 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_1.java b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_1.java new file mode 100755 index 00000000000..8c94676176f --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_1.java @@ -0,0 +1,140 @@ +/* + 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_supports_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_supports_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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 feature = null; + 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_2.java b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_2.java new file mode 100755 index 00000000000..f3441d67dfa --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_2.java @@ -0,0 +1,140 @@ +/* + 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_supports_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_supports_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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 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; + } + } 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 {} + } +} diff --git a/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_3.java b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_3.java new file mode 100755 index 00000000000..4e869b18236 --- /dev/null +++ b/mozilla/java/dom/tests/src/api/NodeImpl_supports_String_String_3.java @@ -0,0 +1,140 @@ +/* + 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_supports_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public NodeImpl_supports_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.logPrint("Object is NULL..."); + return BWBaseTest.FAILED; + } + + 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 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; + } + } 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 {} + } +}