| Index: LayoutTests/dom/html/level1/core/hc_attrinsertbefore7.js
|
| diff --git a/LayoutTests/dom/html/level1/core/hc_attrinsertbefore7.js b/LayoutTests/dom/html/level1/core/hc_attrinsertbefore7.js
|
| index f0145029505deece6e073757192bb983b67c12fb..3f040eeed6085295e289d13b353d1d98ab1506c4 100644
|
| --- a/LayoutTests/dom/html/level1/core/hc_attrinsertbefore7.js
|
| +++ b/LayoutTests/dom/html/level1/core/hc_attrinsertbefore7.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() {
|
| checkFeature("XML", null);
|
|
|
| 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,9 +68,8 @@ function loadComplete() {
|
| }
|
| }
|
|
|
| -
|
| /**
|
| -*
|
| +*
|
| Appends a document fragment containing a CDATASection to an attribute.
|
|
|
| * @author Curt Arnold
|
| @@ -99,7 +93,6 @@ function hc_attrinsertbefore7() {
|
| var lastChild;
|
| var refChild = null;
|
|
|
| -
|
| var docRef = null;
|
| if (typeof(this.doc) != 'undefined') {
|
| docRef = this.doc;
|
| @@ -111,49 +104,46 @@ function hc_attrinsertbefore7() {
|
|
|
| titleAttr = attributes.getNamedItem("title");
|
| terNode = doc.createTextNode("ter");
|
| -
|
| - if(
|
| -
|
| - (builder.contentType == "text/html")
|
| -
|
| - ) {
|
| -
|
| - {
|
| - success = false;
|
| - try {
|
| +
|
| + if(
|
| +
|
| + (builder.contentType == "text/html")
|
| +
|
| + ) {
|
| +
|
| + {
|
| + success = false;
|
| + try {
|
| dayNode = doc.createCDATASection("day");
|
| }
|
| - catch(ex) {
|
| + catch(ex) {
|
| success = (typeof(ex.code) != 'undefined' && ex.code == 9);
|
| - }
|
| - assertTrue("throw_NOT_SUPPORTED_ERR",success);
|
| - }
|
| -
|
| - }
|
| -
|
| - else {
|
| - dayNode = doc.createCDATASection("day");
|
| + }
|
| + assertTrue("throw_NOT_SUPPORTED_ERR",success);
|
| + }
|
| +
|
| + }
|
| +
|
| + else {
|
| + dayNode = doc.createCDATASection("day");
|
| docFrag = doc.createDocumentFragment();
|
| retval = docFrag.appendChild(terNode);
|
| retval = docFrag.appendChild(dayNode);
|
| -
|
| - {
|
| - success = false;
|
| - try {
|
| +
|
| + {
|
| + success = false;
|
| + try {
|
| retval = titleAttr.insertBefore(docFrag,refChild);
|
| }
|
| - catch(ex) {
|
| + catch(ex) {
|
| success = (typeof(ex.code) != 'undefined' && ex.code == 3);
|
| - }
|
| - assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
|
| - }
|
| -
|
| - }
|
| -
|
| -}
|
| -
|
| + }
|
| + assertTrue("throw_HIERARCHY_REQUEST_ERR",success);
|
| + }
|
|
|
| + }
|
|
|
| +}
|
|
|
| function runTest() {
|
| hc_attrinsertbefore7();
|
|
|