OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 Copyright © 2001-2004 World Wide Web Consortium, | 3 Copyright © 2001-2004 World Wide Web Consortium, |
4 (Massachusetts Institute of Technology, European Research Consortium | 4 (Massachusetts Institute of Technology, European Research Consortium |
5 for Informatics and Mathematics, Keio University). All | 5 for Informatics and Mathematics, Keio University). All |
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i
n the | 6 Rights Reserved. This work is distributed under the W3C® Software License [1] i
n the |
7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even | 7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
9 | 9 |
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 | 10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 if (typeof(this.doc) != 'undefined') { | 105 if (typeof(this.doc) != 'undefined') { |
106 docRef = this.doc; | 106 docRef = this.doc; |
107 } | 107 } |
108 doc = load(docRef, "doc", "hc_staff"); | 108 doc = load(docRef, "doc", "hc_staff"); |
109 | 109 |
110 var doc2Ref = null; | 110 var doc2Ref = null; |
111 if (typeof(this.doc2) != 'undefined') { | 111 if (typeof(this.doc2) != 'undefined') { |
112 doc2Ref = this.doc2; | 112 doc2Ref = this.doc2; |
113 } | 113 } |
114 doc2 = load(doc2Ref, "doc2", "hc_staff"); | 114 doc2 = load(doc2Ref, "doc2", "hc_staff"); |
115 parent = doc.createAttribute("xml:lang"); | 115 parent = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml
:lang"); |
116 oldChild = doc.createTextNode("Text"); | 116 oldChild = doc.createTextNode("Text"); |
117 newChild = doc2.createEntityReference("delta"); | 117 newChild = doc2.createEntityReference("delta"); |
118 appendedChild = parent.appendChild(oldChild); | 118 appendedChild = parent.appendChild(oldChild); |
119 | 119 |
120 { | 120 { |
121 success = false; | 121 success = false; |
122 try { | 122 try { |
123 replaced = parent.replaceChild(newChild,oldChild); | 123 replaced = parent.replaceChild(newChild,oldChild); |
124 } | 124 } |
125 catch(ex) { | 125 catch(ex) { |
126 success = (typeof(ex.code) != 'undefined' && ex.code == 4); | 126 success = (typeof(ex.code) != 'undefined' && ex.code == 4); |
127 } | 127 } |
128 assertTrue("throw_WRONG_DOCUMENT_ERR",success); | 128 assertTrue("throw_WRONG_DOCUMENT_ERR",success); |
129 } | 129 } |
130 | 130 |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 | 134 |
135 | 135 |
136 function runTest() { | 136 function runTest() { |
137 nodereplacechild37(); | 137 nodereplacechild37(); |
138 } | 138 } |
OLD | NEW |