Tests: cloneAndCompare: if the item has a name, check that the copy is returned when accessing the children list of its parent by its name.

This commit is contained in:
Jonathan Puckey 2011-05-21 14:05:52 +02:00
parent 1cdaa3a86b
commit e386ce179a

View file

@ -106,6 +106,11 @@ function cloneAndCompare(item) {
equals(function() {
return item.nextSibling == copy;
}, true);
if (item.name) {
equals(function() {
return copy.parent.children[copy.name] == copy;
}, true);
}
compareItems(item, copy);
// Remove the cloned item to restore the document:
copy.remove();