trunk/resources/tests/dom3/Core/nodegetfeature05.xml
changeset 0 5057afe1ec87
equal deleted inserted replaced
-1:000000000000 0:5057afe1ec87
       
     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 
       
    19 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodegetfeature05">
       
    20 <metadata>
       
    21 <title>nodegetfeature05</title>
       
    22 <creator>Curt Arnold</creator>
       
    23 <description>
       
    24 Check implementation of Node.getFeature on Element.
       
    25 </description>
       
    26 <date qualifier="created">2004-02-25</date>
       
    27 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-getFeature"/>
       
    28 </metadata>
       
    29 <var name="doc" type="Document"/>
       
    30 <var name="node" type="Node"/>
       
    31 <var name="nullVersion" type="DOMString" isNull="true"/>
       
    32 <var name="featureImpl" type="Node"/>
       
    33 <var name="isSupported" type="boolean"/>
       
    34 <var name="domImpl" type="DOMImplementation"/>
       
    35 <load var="doc" href="barfoo" willBeModified="false"/>
       
    36 <implementation var="domImpl" obj="doc"/>
       
    37 <documentElement var="node" obj="doc"/>
       
    38 <getFeature interface="Node" var="featureImpl" obj="node" feature='"Core"' version="nullVersion"/>
       
    39 <assertSame actual="featureImpl" expected="node" id="coreUnspecifiedVersion"/> 
       
    40 <getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version="nullVersion"/>
       
    41 <assertSame actual="featureImpl" expected="node" id="cOrEUnspecifiedVersion"/> 
       
    42 <getFeature interface="Node" var="featureImpl" obj="node" feature='"+cOrE"' version="nullVersion"/>
       
    43 <assertSame actual="featureImpl" expected="node" id="PlusCoreUnspecifiedVersion"/> 
       
    44 <getFeature interface="Node" var="featureImpl" obj="node" feature='"org.w3c.domts.bogus.feature"' version="nullVersion"/>
       
    45 <assertNull actual="featureImpl" id="unrecognizedFeature"/> 
       
    46 <getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"2.0"'/>
       
    47 <assertSame actual="featureImpl" expected="node" id="Core20"/> 
       
    48 <getFeature interface="Node" var="featureImpl" obj="node" feature='"cOrE"' version='"3.0"'/>
       
    49 <assertSame actual="featureImpl" expected="node" id="Core30"/> 
       
    50 <!--  ask for some well-known feature, 
       
    51     can't say that they will be supported but they should not throw an exception  -->
       
    52 <isSupported var="isSupported" obj="node" feature='"XML"' version="nullVersion"/>
       
    53 <getFeature interface="Node" var="featureImpl" obj="node" feature='"XML"' version='nullVersion'/>
       
    54 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XMLUnspecified"/></if>
       
    55 <isSupported var="isSupported" obj="node" feature='"SVG"' version="nullVersion"/>
       
    56 <getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/>
       
    57 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="SVGUnspecified"/></if>
       
    58 <isSupported var="isSupported" obj="node" feature='"HTML"' version="nullVersion"/>
       
    59 <getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/>
       
    60 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="HTMLUnspecified"/></if>
       
    61 <isSupported var="isSupported" obj="node" feature='"Events"' version="nullVersion"/>
       
    62 <getFeature interface="Node" var="featureImpl" obj="node" feature='"Events"' version='nullVersion'/>
       
    63 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="EventsUnspecified"/></if>
       
    64 <isSupported var="isSupported" obj="node" feature='"LS"' version="nullVersion"/>
       
    65 <getFeature interface="Node" var="featureImpl" obj="node" feature='"LS"' version='nullVersion'/>
       
    66 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSUnspecified"/></if>
       
    67 <isSupported var="isSupported" obj="node" feature='"LS-Async"' version="nullVersion"/>
       
    68 <getFeature interface="Node" var="featureImpl" obj="node" feature='"LS-Async"' version='nullVersion'/>
       
    69 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="LSAsyncUnspecified"/></if>
       
    70 <isSupported var="isSupported" obj="node" feature='"XPath"' version="nullVersion"/>
       
    71 <getFeature interface="Node" var="featureImpl" obj="node" feature='"XPath"' version='nullVersion'/>
       
    72 <if><isTrue value="isSupported"/><assertSame actual="featureImpl" expected="node" id="XPathUnspecified"/></if>
       
    73 <isSupported var="isSupported" obj="node" feature='"+HTML"' version="nullVersion"/>
       
    74 <getFeature interface="Node" var="featureImpl" obj="node" feature='"HTML"' version='nullVersion'/>
       
    75 <if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusHTMLUnspecified"/></if>
       
    76 <isSupported var="isSupported" obj="node" feature='"+SVG"' version="nullVersion"/>
       
    77 <getFeature interface="Node" var="featureImpl" obj="node" feature='"SVG"' version='nullVersion'/>
       
    78 <if><isTrue value="isSupported"/><assertNotNull actual="featureImpl" id="PlusSVGUnspecified"/></if>
       
    79 </test>