Modified Test Cases. All previously unsupported methods have been

supported. Test Cases for the same have been updated.


git-svn-id: svn://10.0.0.236/trunk@73675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rpallath%eng.sun.com
2000-07-05 17:16:15 +00:00
parent e100ec45de
commit 04de8efbac
69 changed files with 2133 additions and 770 deletions

View File

@@ -74,24 +74,29 @@ public class AttrImpl_getOwnerElement extends BWBaseTest implements Execution
String os = System.getProperty("OS");
osRoutine(os);
setUnsupported();
Document d = (Document)tobj;
if (d != null)
{
Attr a = d.createAttribute("dummyattr_2");
if (a == null) {
TestLoader.logErrPrint("Could not Create Attribute dummyattr_2..");
Element e = d.getDocumentElement();
if (a == null || e == null) {
TestLoader.logErrPrint("Could not Create Attribute dummyattr_2 or get document element ..");
return BWBaseTest.FAILED;
} else {
try {
Element e = a.getOwnerElement();
TestLoader.logErrPrint("Attr 'getOwnerElement()' is not a supported method ...");
e.setAttributeNode(a);
Attr da = e.getAttributeNode("dummyattr_2");
Element oe = da.getOwnerElement();
if (oe != null) { //here we also need to check that oe is the same ???
return BWBaseTest.PASSED;
}
TestLoader.logErrPrint("Attr 'getOwnerElement()' returned incorrect element: "+oe+" "+oe.getNodeType());
return BWBaseTest.FAILED;
} catch (UnsupportedOperationException ue) {
String msg = "UNSUPPORTED METHOD";
TestLoader.logErrPrint(msg);
return BWBaseTest.PASSED;
} catch (Exception ex) {
TestLoader.logErrPrint("Exception was thrown: "+ex);
return BWBaseTest.FAILED;
}
}
} else {