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="hc_elementwrongdocumenterr">
  15. <metadata>
  16. <title>hc_elementWrongDocumentErr</title>
  17. <creator>Curt Arnold</creator>
  18. <description>
  19.    The "setAttributeNode(newAttr)" method raises an
  20.   "WRONG_DOCUMENT_ERR DOMException if the "newAttr"
  21.   was created from a different document than the one that
  22.   created this document.
  23.  
  24.   Retrieve the last employee and attempt to set a new
  25.   attribute node for its "employee" element.  The new
  26.   attribute was created from a document other than the
  27.   one that created this element, therefore a
  28.   WRONG_DOCUMENT_ERR DOMException should be raised.
  29.  
  30.   This test uses the "createAttribute(newAttr)" method
  31.   from the Document interface.
  32. </description>
  33.  
  34. <date qualifier="created">2002-06-09</date>
  35. <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'])"/>
  36. <subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-887236154"/>
  37. <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'])"/>
  38. <subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=249"/>
  39. </metadata>
  40. <var name="doc1" type="Document"/>
  41. <var name="doc2" type="Document"/>
  42. <var name="newAttribute" type="Attr"/>
  43. <var name="addressElementList" type="NodeList"/>
  44. <var name="testAddress" type="Element"/>
  45. <var name="attrAddress" type="Attr"/>
  46. <load var="doc1" href="hc_staff" willBeModified="true"/>
  47. <load var="doc2" href="hc_staff" willBeModified="false"/>
  48. <createAttribute obj="doc2" var="newAttribute" name='"newAttribute"'/>
  49. <getElementsByTagName interface="Document" obj="doc1" tagname='"acronym"' var="addressElementList"/>
  50. <item interface="NodeList" obj="addressElementList" index="4" var="testAddress"/>
  51. <assertDOMException id="throw_WRONG_DOCUMENT_ERR">
  52. <WRONG_DOCUMENT_ERR>
  53. <setAttributeNode obj="testAddress" newAttr="newAttribute" var="attrAddress"/>
  54. </WRONG_DOCUMENT_ERR>
  55. </assertDOMException>
  56. </test>
  57.