Index: LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js |
diff --git a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js |
index 834daf9937cc3792645cc3b10ed111fa285af0d8..a013d081392c3ba1ee758263ba94f75a850ea2a4 100644 |
--- a/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js |
+++ b/LayoutTests/dom/xhtml/level3/core/nodeinsertbefore14.js |
@@ -1,17 +1,14 @@ |
- |
/* |
-Copyright © 2001-2004 World Wide Web Consortium, |
-(Massachusetts Institute of Technology, European Research Consortium |
-for Informatics and Mathematics, Keio University). All |
-Rights Reserved. This work is distributed under the W3C® Software License [1] in the |
-hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+Copyright © 2001-2004 World Wide Web Consortium, |
+(Massachusetts Institute of Technology, European Research Consortium |
+for Informatics and Mathematics, Keio University). All |
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the |
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 |
*/ |
- |
- |
/** |
* Gets URI that identifies the test. |
* @return uri identifier of test |
@@ -42,26 +39,24 @@ function setUpPage() { |
setImplementationAttribute("namespaceAware", true); |
docsLoaded = 0; |
- |
+ |
var docRef = null; |
if (typeof(this.doc) != 'undefined') { |
docRef = this.doc; |
} |
docsLoaded += preload(docRef, "doc", "hc_staff"); |
- |
+ |
if (docsLoaded == 1) { |
setUpPageStatus = 'complete'; |
} |
} catch(ex) { |
- catchInitializationError(builder, ex); |
+ catchInitializationError(builder, ex); |
setUpPageStatus = 'complete'; |
} |
} |
- |
- |
// |
-// This method is called on the completion of |
+// This method is called on the completion of |
// each asychronous load started in setUpTests. |
// |
// When every synchronous loaded document has completed, |
@@ -73,16 +68,15 @@ function loadComplete() { |
} |
} |
- |
/** |
-* |
- The method insertBefore inserts the node newChild before the existing child node refChild. |
- If refChild is null, insert newChild at the end of the list of children. |
- A NO_MODIFICATION_ALLOWED_ERR is raised if the node is read-only. |
+* |
+ The method insertBefore inserts the node newChild before the existing child node refChild. |
+ If refChild is null, insert newChild at the end of the list of children. |
+ A NO_MODIFICATION_ALLOWED_ERR is raised if the node is read-only. |
- Using insertBefore on this Document node attempt to insert a new Attr node before |
- this DocumentType node and verfiy if a NO_MODIFICATION_ALLOWED_ERR is raised. |
- (This can also raise a HIERARCHY_REQUEST_ERR and NOT_FOUND_ERR) |
+ Using insertBefore on this Document node attempt to insert a new Attr node before |
+ this DocumentType node and verfiy if a NO_MODIFICATION_ALLOWED_ERR is raised. |
+ (This can also raise a HIERARCHY_REQUEST_ERR and NOT_FOUND_ERR) |
* @author IBM |
* @author Neil Delima |
@@ -95,7 +89,7 @@ function nodeinsertbefore14() { |
var docType; |
var newAttr; |
var inserted; |
- |
+ |
var docRef = null; |
if (typeof(this.doc) != 'undefined') { |
docRef = this.doc; |
@@ -104,23 +98,20 @@ function nodeinsertbefore14() { |
docType = doc.doctype; |
newAttr = doc.createAttributeNS("http://www.w3.org/DOM/Test","dom3:attr"); |
- |
- { |
- success = false; |
- try { |
+ |
+ { |
+ success = false; |
+ try { |
inserted = docType.insertBefore(newAttr,docType); |
} |
- catch(ex) { |
+ catch(ex) { |
success = (typeof(ex.code) != 'undefined' && ex.code == 7); |
- } |
- assertTrue("NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14",success); |
- } |
+ } |
+ assertTrue("NO_MODIFICATION_ALLOWED_ERR_nodeinsertbefore14",success); |
+ } |
} |
- |
- |
- |
function runTest() { |
nodeinsertbefore14(); |
} |