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-2003 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="elementwrongdocumenterr">
  15. <metadata>
  16. <title>elementWrongDocumentErr</title>
  17. <creator>NIST</creator>
  18. <description>
  19.  
  20.    The "setAttributeNode(newAttr)" method raises an
  21.  
  22.   "WRONG_DOCUMENT_ERR DOMException if the "newAttr"
  23.  
  24.   was created from a different document than the one that
  25.  
  26.   created this document.
  27.  
  28.  
  29.  
  30.   Retrieve the last employee and attempt to set a new
  31.  
  32.   attribute node for its "employee" element.  The new
  33.  
  34.   attribute was created from a document other than the
  35.  
  36.   one that created this element, therefore a
  37.  
  38.   WRONG_DOCUMENT_ERR DOMException should be raised.
  39.  
  40.   This test uses the "createAttribute(newAttr)" method
  41.  
  42.   from the Document interface.
  43.  
  44. </description>
  45. <contributor>Mary Brady</contributor>
  46. <date qualifier="created">2001-08-17</date>
  47. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])"/>
  48. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154"/>
  49. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-887236154')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])"/>
  50. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=249"/>
  51. </metadata>
  52. <var name="doc1" type="Document"/>
  53. <var name="doc2" type="Document"/>
  54. <var name="newAttribute" type="Attr"/>
  55. <var name="addressElementList" type="NodeList"/>
  56. <var name="testAddress" type="Element"/>
  57. <var name="attrAddress" type="Attr"/>
  58. <load var="doc1" href="staff" willBeModified="true"/>
  59. <load var="doc2" href="staff" willBeModified="false"/>
  60. <createAttribute obj="doc2" var="newAttribute" name="&quot;newAttribute&quot;"/>
  61. <getElementsByTagName interface="Document" obj="doc1" tagname="&quot;address&quot;" var="addressElementList"/>
  62. <item interface="NodeList" obj="addressElementList" index="4" var="testAddress"/>
  63. <assertDOMException id="throw_WRONG_DOCUMENT_ERR">
  64. <WRONG_DOCUMENT_ERR>
  65. <setAttributeNode obj="testAddress" newAttr="newAttribute" var="attrAddress"/>
  66. </WRONG_DOCUMENT_ERR>
  67. </assertDOMException>
  68. </test>
  69.