Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2001-2004 World Wide Web Consortium,
  4. (Massachusetts Institute of Technology, Institut National de
  5. Recherche en Informatique et en Automatique, Keio University). All
  6. Rights Reserved. This program is distributed under the W3C's Software
  7. Intellectual Property License. This program is distributed in the
  8. hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  9. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  10. PURPOSE.
  11. See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  12. --><!DOCTYPE test SYSTEM "dom1.dtd">
  13.  
  14. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="characterdatadeletedatanomodificationallowederr">
  15. <metadata>
  16. <title>characterdataDeleteDataNoModificationAllowedErr</title>
  17. <creator>NIST</creator>
  18. <description>
  19.     The "deleteData(offset,count)" method raises a NO_MODIFICATION_ALLOWED_ERR
  20.    DOMException if the node is readonly.  
  21.    Obtain the children of the THIRD "gender" element.  The elements
  22.    content is an entity reference.  Get the FIRST item
  23.    from the entity reference and execute the "deleteData(offset,count)" method.
  24.    This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
  25. </description>
  26. <contributor>Mary Brady</contributor>
  27. <date qualifier="created">2001-08-17</date>
  28. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NO_MODIFICATION_ALLOWED_ERR'])"/>
  29. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781"/>
  30. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NO_MODIFICATION_ALLOWED_ERR'])"/>
  31. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781"/>
  32. </metadata>
  33. <var name="doc" type="Document"/>
  34. <var name="genderList" type="NodeList"/>
  35. <var name="genderNode" type="Node"/>
  36. <var name="entElement" type="Node"/>
  37. <var name="entElementContent" type="Node"/>
  38. <var name="nodeType" type="int"/>
  39. <var name="entReference" type="Node"/>
  40. <load var="doc" href="staff" willBeModified="true"/>
  41. <getElementsByTagName interface="Document" obj="doc" tagname="&quot;gender&quot;" var="genderList"/>
  42. <item interface="NodeList" obj="genderList" index="2" var="genderNode"/>
  43. <firstChild var="entReference" obj="genderNode" interface="Node"/>
  44. <assertNotNull actual="entReference" id="entReferenceNotNull"/>
  45. <nodeType var="nodeType" obj="entReference"/>
  46. <if><equals actual="nodeType" expected="3"/>
  47.         <createEntityReference var="entReference" obj="doc" name='"ent4"'/>
  48.         <assertNotNull actual="entReference" id="createdEntRefNotNull"/>       
  49. </if>
  50. <firstChild var="entElement" obj="entReference" interface="Node"/>
  51. <assertNotNull actual="entElement" id="entElementNotNull"/>
  52. <firstChild var="entElementContent" obj="entElement" interface="Node"/>
  53. <assertNotNull actual="entElementContent" id="entElementContentNotNull"/>
  54. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR">
  55. <NO_MODIFICATION_ALLOWED_ERR>
  56. <deleteData obj="entElementContent" offset="1" count="3"/>
  57. </NO_MODIFICATION_ALLOWED_ERR>
  58. </assertDOMException>
  59. </test>
  60.