89 lines
4.6 KiB
XML
89 lines
4.6 KiB
XML
|
<?xml version="1.0" standalone="no"?>
|
||
|
<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
|
||
|
<!--
|
||
|
|
||
|
Copyright (c) 2003 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="LSParserConfig2">
|
||
|
<metadata>
|
||
|
<title>LSParserConfig2</title>
|
||
|
<creator>Curt Arnold</creator>
|
||
|
<description>Checks getParameterNames and canSetParameter.</description>
|
||
|
<date qualifier="created">2003-12-08</date>
|
||
|
<subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParser-config"/>
|
||
|
</metadata>
|
||
|
<var name="domImpl" type="DOMImplementationLS"/>
|
||
|
<var name="parser" type="LSParser"/>
|
||
|
<var name="config" type="DOMConfiguration"/>
|
||
|
<var name="state" type="boolean"/>
|
||
|
<var name="resolver" type="LSResourceResolver"/>
|
||
|
<var name="NULL_SCHEMA_TYPE" type="DOMString" isNull="true"/>
|
||
|
<var name="parameterNames" type="DOMStringList"/>
|
||
|
<var name="parameterName" type="DOMString"/>
|
||
|
<var name="matchCount" type="int" value="0"/>
|
||
|
<var name="paramValue" type="DOMUserData"/>
|
||
|
<var name="canSet" type="boolean"/>
|
||
|
|
||
|
<implementation var="domImpl"/>
|
||
|
<createLSParser var="parser" obj="domImpl" schemaType="NULL_SCHEMA_TYPE" mode="1"/>
|
||
|
<domConfig var="config" obj="parser" interface="LSParser"/>
|
||
|
<assertNotNull actual="config" id="configNotNull"/>
|
||
|
<parameterNames var="parameterNames" obj="config"/>
|
||
|
<assertNotNull actual="parameterNames" id="parameterNamesNotNull"/>
|
||
|
<for-each collection="parameterNames" member="parameterName">
|
||
|
<!-- get the default value of this parameter -->
|
||
|
<getParameter var="paramValue" obj="config" name="parameterName"/>
|
||
|
<!-- should be able to set to default value -->
|
||
|
<canSetParameter var="canSet" obj="config" name="parameterName" value="paramValue"/>
|
||
|
<assertTrue actual="canSet" id="canSetToDefaultValue"/>
|
||
|
<setParameter obj="config" name="parameterName" value="paramValue"/>
|
||
|
<if>
|
||
|
<or>
|
||
|
<equals actual="parameterName" expected='"canonical-form"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"cdata-sections"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"check-character-normalization"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"comments"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"datatype-normalization"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"entities"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"error-handler"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"infoset"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"namespaces"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"namespace-declarations"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"normalize-characters"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"schema-location"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"schema-type"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"split-cdata-sections"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"validate"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"validate-if-schema"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"well-formed"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"element-content-whitespace"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"charset-overrides-xml-encoding"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"disallow-doctype"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"ignore-unknown-character-denormalizations"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"resource-resolver"' ignoreCase="true"/>
|
||
|
<equals actual="parameterName" expected='"supported-media-types-only"' ignoreCase="true"/>
|
||
|
</or>
|
||
|
<increment var="matchCount" value="1"/>
|
||
|
</if>
|
||
|
</for-each>
|
||
|
<assertEquals actual="matchCount" expected="23" id="definedParameterCount" ignoreCase="false"/>
|
||
|
</test>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|