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-2003 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 "dom2.dtd">
  19. <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2" name="nodeissupported02">
  20. <metadata>
  21. <title>nodeissupported02</title>
  22. <creator>IBM</creator>
  23. <description>
  24.         The method "isSupported(feature,version)" Tests whether the DOM implementation
  25.         implements a specific feature and that feature is supported by this node.
  26.        
  27.         Call the isSupported method on a new attribute node with a combination of features
  28.         versions and versions as below.  Valid feature names are case insensitive and versions
  29.         "2.0", "1.0" and if the version is not specified, supporting any version of the feature
  30.         should return true.  Check if the value returned value was true.
  31. </description>
  32. <contributor>Neil Delima</contributor>
  33. <date qualifier="created">2002-04-24</date>
  34. <subject resource="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-Node-supports"/>
  35. </metadata>
  36. <var name="doc" type="Document"/>              
  37. <var name="attribute" type="Attr"/>
  38. <var name="version" type="DOMString" value="&quot;&quot;"/>            
  39. <var name="version1" type="DOMString" value="&quot;1.0&quot;"/>        
  40. <var name="version2" type="DOMString" value="&quot;2.0&quot;"/>        
  41. <var name="featureCore" type="DOMString"/>
  42. <var name="featureXML" type="DOMString"/>
  43. <var name="success" type="boolean"/>           
  44. <var name="featuresXML" type="List">
  45. <member>&quot;XML&quot;</member>
  46. <member>&quot;xmL&quot;</member>
  47. </var>
  48. <var name="featuresCore" type="List">
  49. <member>&quot;Core&quot;</member>
  50. <member>&quot;CORE&quot;</member>
  51. </var>
  52. <load var="doc" href="staffNS" willBeModified="false"/>
  53. <createAttribute obj="doc" var="attribute" name='"TestAttr"'/>
  54. <for-each collection="featuresXML" member="featureXML">
  55. <isSupported obj="attribute" var="success" feature="featureXML" version="version"/>
  56. <assertTrue actual="success" id="nodeissupported02_XML1"/>
  57. <isSupported obj="attribute" var="success" feature="featureXML" version="version1"/>
  58. <assertTrue actual="success" id="nodeissupported02_XML2"/>
  59. </for-each>
  60. <for-each collection="featuresCore" member="featureCore">
  61. <isSupported obj="attribute" var="success" feature="featureCore" version="version"/>
  62. <assertTrue actual="success" id="nodeissupported02_Core1"/>
  63.  
  64. <!--   isSupported("Core", "1.0") is unspecified since "Core" was not defined in L1  -->
  65. <isSupported obj="attribute" var="success" feature="featureCore" version="version1"/>
  66.  
  67. <isSupported obj="attribute" var="success" feature="featureCore" version="version2"/>
  68. <assertTrue actual="success" id="nodeissupported02_Core3"/>
  69. </for-each>
  70. </test>
  71.