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 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="attrsetvaluenomodificationallowederrEE">
  15. <metadata>
  16. <title>attrSetValueNoModificationAllowedErrEE</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.     The "setValue()" method for an attribute causes the
  20.   DOMException NO_MODIFICATION_ALLOWED_ERR to be raised
  21.   if the node is readonly.
  22.  
  23.   Create an entity reference using document.createEntityReference()
  24.   Get the "domestic" attribute from the entity
  25.   reference and execute the "setValue()" method.
  26.   This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
  27. </description>
  28. <date qualifier="created">2001-08-22</date>
  29. <subject resource="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NO_MODIFICATION_ALLOWED_ERR'])"/>
  30. <subject resource="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-core#ID-221662474"/>
  31. <subject resource="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-core#xpointer(id('ID-221662474')/setraises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NO_MODIFICATION_ALLOWED_ERR'])"/>
  32. <subject resource="http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html"/>
  33. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474"/>
  34. <source resource="http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrsetvaluenomodificationallowederr.xml"/>
  35. </metadata>
  36. <var name="doc" type="Document"/>
  37. <var name="entRef" type="EntityReference"/>
  38. <var name="entElement" type="Element"/>
  39. <var name="attrList" type="NamedNodeMap"/>
  40. <var name="attrNode" type="Node"/>
  41. <var name="gender" type="Node"/>
  42. <var name="genderList" type="NodeList"/>
  43. <var name="appendedChild" type="Node"/>
  44. <load var="doc" href="staff" willBeModified="true"/>
  45. <getElementsByTagName interface="Document" obj="doc" var="genderList" tagname="&quot;gender&quot;"/>
  46. <item interface="NodeList" obj="genderList" var="gender" index="2"/>
  47. <assertNotNull actual="gender" id="genderNotNull"/>
  48. <createEntityReference obj="doc" var="entRef" name='"ent4"'/>
  49. <assertNotNull actual="entRef" id="entRefNotNull"/>
  50. <appendChild obj="gender" newChild="entRef" var="appendedChild"/>
  51. <firstChild obj="entRef" var="entElement" interface="Node"/>
  52. <assertNotNull actual="entElement" id="entElementNotNull"/>
  53. <attributes obj="entElement" var="attrList"/>
  54. <getNamedItem obj="attrList" var="attrNode" name="&quot;domestic&quot;"/>
  55. <assertDOMException id="setValue_throws_NO_MODIFICATION">
  56.     <NO_MODIFICATION_ALLOWED_ERR>
  57.         <value interface="Attr" obj="attrNode" value='"newvalue"'/>
  58.     </NO_MODIFICATION_ALLOWED_ERR>
  59. </assertDOMException>
  60. <assertDOMException id="setNodeValue_throws_NO_MODIFICATION">
  61.     <NO_MODIFICATION_ALLOWED_ERR>
  62.         <nodeValue interface="Node" obj="attrNode" value='"newvalue2"'/>
  63.     </NO_MODIFICATION_ALLOWED_ERR>
  64. </assertDOMException>
  65. </test>
  66.