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"?><?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. <!DOCTYPE test SYSTEM "dom3.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeinsertbefore15">
  20. <metadata>
  21. <title>nodeinsertbefore15</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         A NO_MODIFICATION_ALLOWED_ERR is raised if the node is read-only.
  25.        
  26.         Using insertBefore on a new EntityReference node attempt to insert Element, Text,
  27.         Comment, ProcessingInstruction and CDATASection nodes before an element child
  28.         and verify if a NO_MODIFICATION_ALLOWED_ERR is thrown.
  29. </description>
  30. <contributor>Neil Delima</contributor>
  31. <date qualifier="created">2002-06-10</date>
  32. <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-952280727"/>
  33. </metadata>
  34. <var name="doc" type="Document"/>
  35. <var name="entRef" type="EntityReference"/>
  36. <var name="elemChild" type="Node"/>
  37. <var name="txt" type="Text"/>
  38. <var name="elem" type="Element"/>
  39. <var name="comment" type="Comment"/>
  40. <var name="pi" type="ProcessingInstruction"/>
  41. <var name="cdata" type="CDATASection"/>
  42. <var name="inserted" type="Node"/>
  43. <load var="doc" href="hc_staff" willBeModified="true"/>
  44. <createEntityReference var="entRef" obj="doc" name='"delta"'/>
  45. <firstChild obj="entRef" var="elemChild" interface="Node"/>
  46. <createCDATASection var="cdata" obj="doc" data='"CDATASection"'/>
  47. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_1">
  48. <NO_MODIFICATION_ALLOWED_ERR>
  49. <insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="cdata"/>
  50. </NO_MODIFICATION_ALLOWED_ERR>
  51. </assertDOMException>
  52. <createProcessingInstruction var="pi" obj="doc" target='"target"' data='"data"'/>
  53. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_2">
  54. <NO_MODIFICATION_ALLOWED_ERR>
  55. <insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="pi"/>
  56. </NO_MODIFICATION_ALLOWED_ERR>
  57. </assertDOMException>
  58. <createComment var="comment" obj="doc" data='"Comment"'/>
  59. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_3">
  60. <NO_MODIFICATION_ALLOWED_ERR>
  61. <insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="comment"/>
  62. </NO_MODIFICATION_ALLOWED_ERR>
  63. </assertDOMException>
  64. <createTextNode var="txt" obj="doc" data='"Text"'/>
  65. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_4">
  66. <NO_MODIFICATION_ALLOWED_ERR>
  67. <insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="txt"/>
  68. </NO_MODIFICATION_ALLOWED_ERR>
  69. </assertDOMException>
  70. <createElementNS var="elem" obj="doc" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"body"'/>
  71. <assertDOMException id="throw_NO_MODIFICATION_ALLOWED_ERR_5">
  72. <NO_MODIFICATION_ALLOWED_ERR>
  73. <insertBefore obj="entRef" var="inserted" refChild="elemChild" newChild="elem"/>
  74. </NO_MODIFICATION_ALLOWED_ERR>
  75. </assertDOMException>
  76. </test>
  77.