|
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="domconfigurationcansetparameter04"> |
|
19 <metadata> |
|
20 <title>domconfigurationcansetparameter04</title> |
|
21 <creator>IBM</creator> |
|
22 <description> |
|
23 The parameter entities is turned on by default. Check to see if this feature can be set |
|
24 to false by invoking canSetParameter method. Also check that this method does not change the |
|
25 value of parameter by checking if entity references still exist in the document. |
|
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 <implementationAttribute name="expandEntityReferences" value="false"/> |
|
32 <implementationAttribute name="namespaceAware" value="true"/> |
|
33 <var name="doc" type="Document"/> |
|
34 <var name="domConfig" type="DOMConfiguration"/> |
|
35 <var name="acronymList" type="NodeList"/> |
|
36 <var name="acronymElem" type="Node"/> |
|
37 <var name="nodeType" type="int"/> |
|
38 <var name="first" type="Node"/> |
|
39 <var name="canSet" type="boolean"/> |
|
40 <var name="paramVal" type="boolean"/> |
|
41 <load var="doc" href="hc_staff" willBeModified="true"/> |
|
42 <domConfig obj="doc" var="domConfig" interface="Document"/> |
|
43 <canSetParameter obj="domConfig" var="canSet" name='"entities"' value="false"/> |
|
44 <assertTrue actual="canSet" id="canSetFalse"/> |
|
45 <!-- checking if it can be set false should not actually change it --> |
|
46 <getParameter var="paramVal" obj="domConfig" name='"entities"'/> |
|
47 <assertTrue actual="paramVal" id="stillTrue"/> |
|
48 <!-- or change the behavior of normalize document --> |
|
49 <normalizeDocument obj="doc"/> |
|
50 <getElementsByTagName var="acronymList" obj="doc" tagname='"acronym"' interface="Document"/> |
|
51 <item var="acronymElem" obj="acronymList" index="1" interface="NodeList"/> |
|
52 <firstChild var="first" obj="acronymElem" interface="Node"/> |
|
53 <nodeType var="nodeType" obj="first" interface="Node"/> |
|
54 <assertEquals actual="nodeType" expected="5" id="entityRefPreserved" ignoreCase="false"/> |
|
55 </test> |