mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
skip if not loading external DTD
This commit is contained in:
parent
3536ce2413
commit
3c7aac4666
2 changed files with 5 additions and 0 deletions
|
@ -81,11 +81,14 @@ class elementremoveattribute : public DOMTestCase<string_type, string_adaptor>
|
||||||
Document doc;
|
Document doc;
|
||||||
NodeList elementList;
|
NodeList elementList;
|
||||||
Element testEmployee;
|
Element testEmployee;
|
||||||
|
Node attrNode;
|
||||||
String attrValue;
|
String attrValue;
|
||||||
doc = (Document) baseT::load("staff", true);
|
doc = (Document) baseT::load("staff", true);
|
||||||
elementList = doc.getElementsByTagName(SA::construct_from_utf8("address"));
|
elementList = doc.getElementsByTagName(SA::construct_from_utf8("address"));
|
||||||
testEmployee = (Element) elementList.item(3);
|
testEmployee = (Element) elementList.item(3);
|
||||||
testEmployee.removeAttribute(SA::construct_from_utf8("street"));
|
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"));
|
attrValue = testEmployee.getAttribute(SA::construct_from_utf8("street"));
|
||||||
baseT::assertEquals("Yes", attrValue, __LINE__, __FILE__);
|
baseT::assertEquals("Yes", attrValue, __LINE__, __FILE__);
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@ class elementremoveattributerestoredefaultvalue : public DOMTestCase<string_type
|
||||||
testEmployee = (Element) elementList.item(2);
|
testEmployee = (Element) elementList.item(2);
|
||||||
streetAttr = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
|
streetAttr = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
|
||||||
removedAttr = testEmployee.removeAttributeNode(streetAttr);
|
removedAttr = testEmployee.removeAttributeNode(streetAttr);
|
||||||
|
streetAttr = testEmployee.getAttributeNode(SA::construct_from_utf8("street"));
|
||||||
|
baseT::skipIfNull(streetAttr);
|
||||||
attribute = testEmployee.getAttribute(SA::construct_from_utf8("street"));
|
attribute = testEmployee.getAttribute(SA::construct_from_utf8("street"));
|
||||||
baseT::assertEquals("Yes", attribute, __LINE__, __FILE__);
|
baseT::assertEquals("Yes", attribute, __LINE__, __FILE__);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue