|
1 <?xml version="1.0" standalone="no"?> |
|
2 <?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> |
|
3 <!-- |
|
4 |
|
5 Copyright (c) 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 |
|
20 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="domconfigschemalocation1"> |
|
21 <metadata> |
|
22 <title>domconfigschemalocation1</title> |
|
23 <creator>Curt Arnold</creator> |
|
24 <description>Checks behavior of "schema-location" configuration parameter.</description> |
|
25 <date qualifier="created">2004-01-10</date> |
|
26 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#parameter-schema-location"/> |
|
27 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-getParameter"/> |
|
28 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#DOMConfiguration-setParameter"/> |
|
29 </metadata> |
|
30 <var name="domImpl" type="DOMImplementation"/> |
|
31 <var name="doc" type="Document"/> |
|
32 <var name="domConfig" type="DOMConfiguration"/> |
|
33 <var name="nullDocType" type="DocumentType" isNull="true"/> |
|
34 <var name="canSet" type="boolean"/> |
|
35 <var name="state" type="DOMString"/> |
|
36 <var name="parameter" type="DOMString" value='"sChEma-location"'/> |
|
37 <var name="nullSchemaLocation" type="DOMString" isNull="true"/> |
|
38 <var name="sampleSchemaLocation" type="DOMString" value='"http://www.example.com/schemas/sampleschema.xsd"'/> |
|
39 <implementation var="domImpl"/> |
|
40 <createDocument var="doc" obj="domImpl" namespaceURI='"http://www.w3.org/1999/xhtml"' qualifiedName='"html"' doctype="nullDocType"/> |
|
41 <domConfig var="domConfig" obj="doc" interface="Document"/> |
|
42 <canSetParameter var="canSet" obj="domConfig" name="parameter" value="true"/> |
|
43 <assertFalse actual="canSet" id="canSetTrue"/> |
|
44 <try> |
|
45 <getParameter var="state" obj="domConfig" name="parameter"/> |
|
46 <assertNull actual="state" id="defaultSchemaLocation"/> |
|
47 <catch> |
|
48 <DOMException code="NOT_FOUND_ERR"> |
|
49 <return/> |
|
50 </DOMException> |
|
51 </catch> |
|
52 </try> |
|
53 <canSetParameter var="canSet" obj="domConfig" name="parameter" value="sampleSchemaLocation"/> |
|
54 <assertTrue actual="canSet" id="canSetURI"/> |
|
55 <canSetParameter var="canSet" obj="domConfig" name="parameter" value="nullSchemaLocation"/> |
|
56 <assertTrue actual="canSet" id="canSetNull"/> |
|
57 <setParameter obj="domConfig" name="parameter" value="sampleSchemaLocation"/> |
|
58 <getParameter var="state" obj="domConfig" name="parameter"/> |
|
59 <assertEquals actual="state" expected="sampleSchemaLocation" ignoreCase="false" id="setURIEffective"/> |
|
60 <setParameter obj="domConfig" name="parameter" value="nullSchemaLocation"/> |
|
61 <getParameter var="state" obj="domConfig" name="parameter"/> |
|
62 <assertNull actual="state" id="setNullEffective"/> |
|
63 </test> |