summaryrefslogtreecommitdiff
path: root/test/testcases/tests/level3/core/domimplementationregistry23.xml
blob: cb7f5fa8cb3c7bd46464d72155902b5ecbf46788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>

<!--

Copyright (c) 2004 World Wide Web Consortium, 
(Massachusetts Institute of Technology, Institut National de
Recherche en Informatique et en Automatique, Keio University).  All 
Rights Reserved.  This program is distributed under the W3C's Software
Intellectual Property License.  This program is distributed in the 
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.  

See W3C License http://www.w3.org/Consortium/Legal/ for more details.

-->

<!DOCTYPE test SYSTEM "dom3.dtd">
<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domimplementationregistry23">
<metadata>
<title>domimplementationregistry23</title>
<creator>Curt Arnold</creator>
<description>
DOMImplementationRegistry.getDOMImplementationList("cOrE 3.0 xMl 3.0 eVeNts 2.0 lS") 
should return an empty list or a list of DOMImplementation that implements the specified features.
</description>
<date qualifier="created">2004-01-15</date>
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding"/>
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding"/>
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-getDOMImpls"/>
</metadata>
<var name="domImplRegistry" type="DOMImplementationRegistry"/>
<var name="domImpl" type="DOMImplementation"/>
<var name="hasCore" type="boolean"/>
<var name="hasXML" type="boolean"/>
<var name="hasEvents" type="boolean"/>
<var name="hasLS" type="boolean"/>
<var name="baseImpl" type="DOMImplementation"/>
<var name="nullVersion" type="DOMString" isNull="true"/>
<var name="domImplList" type="DOMImplementationList"/>
<var name="length" type="int"/>
<DOMImplementationRegistry.newInstance var="domImplRegistry"/>
<assertNotNull actual="domImplRegistry" id="domImplRegistryNotNull"/>
<getDOMImplementationList var="domImplList" obj="domImplRegistry" 
	features='"cOrE 3.0 xMl 3.0 eVeNts 2.0 lS"'
	interface="DOMImplementationRegistry"/>
<length var="length" obj="domImplList" interface="DOMImplementationList"/>
<if>
	<equals actual="length" expected="0" ignoreCase="false"/>
	<implementation var="baseImpl"/>
	<hasFeature var="hasCore" obj="baseImpl" feature='"Core"' version='"3.0"'/>
	<hasFeature var="hasXML" obj="baseImpl" feature='"XML"' version='"3.0"'/>
	<hasFeature var="hasEvents" obj="baseImpl" feature='"Events"' version='"2.0"'/>
	<hasFeature var="hasLS" obj="baseImpl" feature='"LS"' version='nullVersion'/>
	<assertFalse id="baseImplFeatures">
		<and>
			<isTrue value="hasCore"/>
			<isTrue value="hasXML"/>
			<isTrue value="hasEvents"/>
			<isTrue value="hasLS"/>
		</and>
	</assertFalse>
	<else>
		<for-each collection="domImplList" member="domImpl">
			<hasFeature var="hasCore" obj="domImpl" feature='"Core"' version='"3.0"'/>
			<assertTrue actual="hasCore" id="hasCore"/>
			<hasFeature var="hasXML" obj="domImpl" feature='"XML"' version='"3.0"'/>
			<assertTrue actual="hasXML" id="hasXML"/>
			<hasFeature var="hasEvents" obj="domImpl" feature='"Events"' version='"2.0"'/>
			<assertTrue actual="hasEvents" id="hasEvents"/>
			<hasFeature var="hasLS" obj="domImpl" feature='"LS"' version='nullVersion'/>
			<assertTrue actual="hasLS" id="hasLS"/>
		</for-each>
	</else>
</if>
</test>