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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 var newAttr; | 96 var newAttr; |
97 var inserted; | 97 var inserted; |
98 | 98 |
99 var docRef = null; | 99 var docRef = null; |
100 if (typeof(this.doc) != 'undefined') { | 100 if (typeof(this.doc) != 'undefined') { |
101 docRef = this.doc; | 101 docRef = this.doc; |
102 } | 102 } |
103 doc = load(docRef, "doc", "hc_staff"); | 103 doc = load(docRef, "doc", "hc_staff"); |
104 docType = doc.doctype; | 104 docType = doc.doctype; |
105 | 105 |
106 newAttr = doc.createAttribute("dom3:attr"); | 106 newAttr = doc.createAttributeNS("http://www.w3.org/DOM/Test","dom3:attr"); |
107 | 107 |
108 { | 108 { |
109 success = false; | 109 success = false; |
110 try { | 110 try { |
111 inserted = docType.insertBefore(newAttr,docType); | 111 inserted = docType.insertBefore(newAttr,docType); |
112 } | 112 } |
113 catch(ex) { | 113 catch(ex) { |
114 success = (typeof(ex.code) != 'undefined' && ex.code == 7); | 114 success = (typeof(ex.code) != 'undefined' && ex.code == 7); |
115 } | 115 } |
116 assertTrue("NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14",succ
ess); | 116 assertTrue("NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14",succ
ess); |
117 } | 117 } |
118 | 118 |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 | 122 |
123 | 123 |
124 function runTest() { | 124 function runTest() { |
125 nodeinsertbefore14(); | 125 nodeinsertbefore14(); |
126 } | 126 } |
OLD | NEW |