Lines Matching defs:clone
659 self.confirm(keys1 == keys2, "clone of element has same attribute keys")
668 , "clone of attribute node has proper attribute values")
670 "clone of attribute node correctly owned")
675 clone = root.cloneNode(deep)
677 root, clone, "testCloneElement" + (deep and "Deep" or "Shallow"))
682 return dom, clone
685 dom, clone = self._setupCloneElement(0)
686 self.confirm(len(clone.childNodes) == 0
687 and clone.childNodes.length == 0
688 and clone.parentNode is None
689 and clone.toxml() == '<doc attr="value"/>'
694 dom, clone = self._setupCloneElement(1)
695 self.confirm(len(clone.childNodes) == 1
696 and clone.childNodes.length == 1
697 and clone.parentNode is None
698 and clone.toxml() == '<doc attr="value"><foo/></doc>'
741 clone = doctype.cloneNode(1)
742 self.confirm(clone is not None
743 and clone.nodeName == doctype.nodeName
744 and clone.name == doctype.name
745 and clone.publicId == doctype.publicId
746 and clone.systemId == doctype.systemId
747 and len(clone.entities) == len(doctype.entities)
748 and clone.entities.item(len(clone.entities)) is None
749 and len(clone.notations) == len(doctype.notations)
750 and clone.notations.item(len(clone.notations)) is None
751 and len(clone.childNodes) == 0)
754 ce = clone.entities.item(i)
766 cn = clone.notations.item(i)
775 clone = doc.doctype.cloneNode(1)
776 self.confirm(clone is None, "testCloneDocumentTypeDeepNotOk")
780 clone = doctype.cloneNode(0)
781 self.confirm(clone is not None
782 and clone.nodeName == doctype.nodeName
783 and clone.name == doctype.name
784 and clone.publicId == doctype.publicId
785 and clone.systemId == doctype.systemId
786 and len(clone.entities) == 0
787 and clone.entities.item(0) is None
788 and len(clone.notations) == 0
789 and clone.notations.item(0) is None
790 and len(clone.childNodes) == 0)
794 clone = doc.doctype.cloneNode(0)
795 self.confirm(clone is None, "testCloneDocumentTypeShallowNotOk")
826 clone = attr.cloneNode(deep)
827 self.confirm(not clone.isSameNode(attr))
828 self.confirm(not attr.isSameNode(clone))
829 self.confirm(clone.ownerElement is None,
831 self.confirm(clone.ownerDocument.isSameNode(attr.ownerDocument),
833 self.confirm(clone.specified,
846 clone = pi.cloneNode(deep)
847 self.confirm(clone.target == pi.target
848 and clone.data == pi.data)
882 # clone Document
883 clone = document.cloneNode(deep=True)
885 self.assertEqual(clone.documentElement.firstChild.wholeText,
888 dst = clone.doctype.entities['smile']
890 # clone DocumentType
892 clone = doctype.cloneNode(deep=True)
895 dst = clone.entities['smile']