skip if not loading external DTD

This commit is contained in:
jez 2010-12-26 23:32:31 +00:00
parent 3536ce2413
commit 3c7aac4666
2 changed files with 5 additions and 0 deletions

View file

@ -81,11 +81,14 @@ class elementremoveattribute : public DOMTestCase<string_type, string_adaptor>
Document doc;
NodeList elementList;
Element testEmployee;
Node attrNode;
String attrValue;
doc = (Document) baseT::load("staff", true);
elementList = doc.getElementsByTagName(SA::construct_from_utf8("address"));
testEmployee = (Element) elementList.item(3);
testEmployee.removeAttribute(SA::construct_from_utf8("street"));
attrNode = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
baseT::skipIfNull(attrNode);
attrValue = testEmployee.getAttribute(SA::construct_from_utf8("street"));
baseT::assertEquals("Yes", attrValue, __LINE__, __FILE__);

View file

@ -86,6 +86,8 @@ class elementremoveattributerestoredefaultvalue : public DOMTestCase<string_type
testEmployee = (Element) elementList.item(2);
streetAttr = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
removedAttr = testEmployee.removeAttributeNode(streetAttr);
streetAttr = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
baseT::skipIfNull(streetAttr);
attribute = testEmployee.getAttribute(SA::construct_from_utf8("street"));
baseT::assertEquals("Yes", attribute, __LINE__, __FILE__);