Index: LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js |
diff --git a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js |
similarity index 80% |
copy from LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js |
copy to LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js |
index 6cdc1dd6fdb2aefb8ebb190c609cb9a70fafa0a3..841a771dc97a1a7b488e068cf4d5fcd3cbdc690c 100644 |
--- a/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking01.js |
+++ b/LayoutTests/dom/xhtml/level3/core/documentsetstricterrorchecking02.js |
@@ -17,7 +17,7 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
* @return uri identifier of test |
*/ |
function getTargetURI() { |
- return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking01"; |
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetstricterrorchecking02"; |
} |
var docsLoaded = -1000000; |
@@ -75,39 +75,39 @@ function loadComplete() { |
/** |
* |
- Set the strictErrorChecking attribute value on this documentNode to false and then to true. |
- Call the createAttribute method on this document with an illegal character in the qualifiedName |
- and check if the INVALID_CHARACTER_ERR is thrown. |
+ Set the strictErrorChecking attribute value on a new Document to true. |
+ Call the createAttributeNS method on this document with a a null namespaceURI and a qualified name |
+ with a prefix and check if the NAMESPACE_ERR is thrown. |
* @author IBM |
* @author Neil Delima |
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-strictErrorChecking |
*/ |
-function documentsetstricterrorchecking01() { |
+function documentsetstricterrorchecking02() { |
var success; |
- if(checkInitialization(builder, "documentsetstricterrorchecking01") != null) return; |
+ if(checkInitialization(builder, "documentsetstricterrorchecking02") != null) return; |
var doc; |
var newAttr; |
+ var nullValue = null; |
+ |
var docRef = null; |
if (typeof(this.doc) != 'undefined') { |
docRef = this.doc; |
} |
doc = load(docRef, "doc", "hc_staff"); |
- doc.strictErrorChecking = false; |
- |
doc.strictErrorChecking = true; |
{ |
success = false; |
try { |
- newAttr = doc.createAttribute("@"); |
+ newAttr = doc.createAttributeNS(nullValue,"dom:test"); |
} |
catch(ex) { |
- success = (typeof(ex.code) != 'undefined' && ex.code == 5); |
+ success = (typeof(ex.code) != 'undefined' && ex.code == 14); |
} |
- assertTrue("INVALID_CHARACTER_ERR_documentsetstricterrorchecking01",success); |
+ assertTrue("NAMESPACE_ERR_documentsetstricterrorchecking02",success); |
} |
} |
@@ -116,5 +116,5 @@ function documentsetstricterrorchecking01() { |
function runTest() { |
- documentsetstricterrorchecking01(); |
+ documentsetstricterrorchecking02(); |
} |