trunk/resources/tests/dom3/Core/domconfigurationcansetparameter06.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 Copyright (c) 2001-2004 World Wide Web Consortium, 
       
     5 (Massachusetts Institute of Technology, Institut National de
       
     6 Recherche en Informatique et en Automatique, Keio University).  All 
       
     7 Rights Reserved.  This program is distributed under the W3C's Software
       
     8 Intellectual Property License.  This program is distributed in the 
       
     9 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
       
    10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
       
    11 PURPOSE.  
       
    12 
       
    13 See W3C License http://www.w3.org/Consortium/Legal/ for more details.
       
    14 
       
    15 -->
       
    16 
       
    17 
       
    18 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigurationcansetparameter06">
       
    19 <metadata>
       
    20 <title>domconfigurationcansetparameter06</title>
       
    21 <creator>IBM</creator>
       
    22 <description>
       
    23 Check that canSetParameter('element-content-whitespace', true) returns true
       
    24 and that canSetParameter('element-content-whitespace) does not change value of
       
    25 parameter.
       
    26 </description>
       
    27 <contributor>Jenny Hsu</contributor>
       
    28 <date qualifier="created">2003-11-04</date>
       
    29 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-canSetParameter"/>
       
    30 </metadata>
       
    31 <var name="doc" type="Document"/>
       
    32 <var name="domConfig" type="DOMConfiguration"/>
       
    33 <var name="itemList" type="NodeList"/>
       
    34 <var name="elementBody" type="Element"/>
       
    35 <var name="textNode" type="Text"/>
       
    36 <var name="canSet" type="boolean"/>
       
    37 <var name="canSetFalse" type="boolean"/>
       
    38 <var name="paramVal" type="boolean"/>
       
    39 <var name="hasWhitespace" type="boolean"/>
       
    40 <load var="doc" href="barfoo" willBeModified="true"/>
       
    41 <domConfig obj="doc" var="domConfig" interface="Document"/>
       
    42 <!--  return value may be either true or false, 
       
    43        but the call should success and not actually change the value   -->
       
    44 <canSetParameter obj="domConfig" var="canSetFalse" name='"element-content-whitespace"' value="false"/>
       
    45 <getParameter var="paramVal" obj="domConfig" name='"element-content-whitespace"'/>
       
    46 <assertTrue actual="paramVal" id="stillTrue"/>
       
    47 <if><isTrue value="canSetFalse"/>
       
    48    <!--  if it can be set false, actually set it   -->
       
    49    <setParameter obj="domConfig" name='"element-content-whitespace"' value="false"/>
       
    50 </if>
       
    51 <canSetParameter obj="domConfig" var="canSet" name='"element-content-whitespace"' value="true"/>
       
    52 <assertTrue actual="canSet" id="canSetTrue"/>
       
    53 <if><isTrue value="canSetFalse"/>
       
    54 	<getParameter var="paramVal" obj="domConfig" name='"element-content-whitespace"'/>
       
    55     <assertFalse actual="paramVal" id="stillFalse"/>
       
    56 </if>
       
    57 </test>