trunk/resources/tests/dom3/Core/noderemovechild12.xml
changeset 0 5057afe1ec87
equal deleted inserted replaced
-1:000000000000 0:5057afe1ec87
       
     1 <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
       
     2 
       
     3 <!--
       
     4 
       
     5 Copyright (c) 2001-2004 World Wide Web Consortium, 
       
     6 (Massachusetts Institute of Technology, Institut National de
       
     7 Recherche en Informatique et en Automatique, Keio University).  All 
       
     8 Rights Reserved.  This program is distributed under the W3C's Software
       
     9 Intellectual Property License.  This program is distributed in the 
       
    10 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
       
    11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
       
    12 PURPOSE.  
       
    13 
       
    14 See W3C License http://www.w3.org/Consortium/Legal/ for more details.
       
    15 
       
    16 -->
       
    17 
       
    18 
       
    19 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="noderemovechild12">
       
    20 <metadata>
       
    21 <title>noderemovechild12</title>
       
    22 <creator>IBM</creator>
       
    23 <description>
       
    24 	The method removeChild removes the child node indicated by oldChild from the list 
       
    25 	of children, and returns it. 
       
    26 
       
    27 	Using removeChild on a new DocumentFragment node attempt to remove a new EntityReference node.
       
    28         Also attempt to remove the document fragment node from the EntityReference.  Verify that a 
       
    29         NO_MODIFICATION_ALLOWED_ERR (EntityReference node is read-only) or a NOT_FOUND_ERR is thrown.
       
    30 </description>
       
    31 <contributor>Neil Delima</contributor>
       
    32 <date qualifier="created">2002-06-10</date>
       
    33 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-1734834066"/>
       
    34 </metadata>
       
    35 <implementationAttribute name="namespaceAware" value="true"/>
       
    36 <var name="doc" type="Document"/>
       
    37 <var name="docFrag" type="DocumentFragment"/>
       
    38 <var name="eRef" type="EntityReference"/>
       
    39 <var name="removedERef" type="EntityReference"/>
       
    40 <var name="appendedChild" type="Node"/>
       
    41 <var name="removedChild" type="Node"/>
       
    42 <load var="doc" href="hc_staff" willBeModified="false"/>
       
    43 <createDocumentFragment var="docFrag" obj="doc"/>
       
    44 <createEntityReference var="eRef" obj="doc" name='"ent1"'/>
       
    45 <appendChild obj="docFrag" var="appendedChild" newChild="eRef"/>
       
    46 <removeChild obj="docFrag" var="removedChild" oldChild="eRef" />
       
    47 <firstChild var="removedERef" obj="docFrag" interface="Node"/>
       
    48 <assertNull actual="removedERef" id="noderemovechild12"/>
       
    49 <try>
       
    50         <removeChild obj="eRef" var="removedChild" oldChild="docFrag" />
       
    51         <catch>
       
    52                 <DOMException code="NOT_FOUND_ERR"/>
       
    53                 <DOMException code="NO_MODIFICATION_ALLOWED_ERR"/>
       
    54         </catch>
       
    55 </try>
       
    56 </test>