Index: LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.js |
diff --git a/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.js b/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.js |
index 3216c53728c29e9ee00a46f6c55145a59f206ff9..851a41019b710ce01b75f5d3db5e0e3c36f3c5ee 100644 |
--- a/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.js |
+++ b/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.js |
@@ -89,50 +89,23 @@ function loadComplete() { |
*/ |
function documentinvalidcharacterexceptioncreatepi() { |
var success; |
- if(checkInitialization(builder, "documentinvalidcharacterexceptioncreatepi") != null) return; |
- var doc; |
- var badPI; |
- |
- var docRef = null; |
- if (typeof(this.doc) != 'undefined') { |
- docRef = this.doc; |
- } |
- doc = load(docRef, "doc", "hc_staff"); |
- |
- if( |
- |
- (builder.contentType == "text/html") |
- |
- ) { |
- |
- { |
- success = false; |
- try { |
- badPI = doc.createProcessingInstruction("foo","data"); |
- } |
- catch(ex) { |
- success = (typeof(ex.code) != 'undefined' && ex.code == 9); |
- } |
- assertTrue("throw_NOT_SUPPORTED_ERR",success); |
- } |
- |
- } |
- |
- else { |
- |
- { |
- success = false; |
- try { |
- badPI = doc.createProcessingInstruction("invalid^Name","data"); |
- } |
- catch(ex) { |
- success = (typeof(ex.code) != 'undefined' && ex.code == 5); |
- } |
- assertTrue("throw_INVALID_CHARACTER_ERR",success); |
- } |
+ if (checkInitialization(builder, "documentinvalidcharacterexceptioncreatepi1") != null) return; |
+ var doc; |
+ var badPI; |
+ |
+ var docRef = null; |
+ if (typeof(this.doc) != 'undefined') { |
+ docRef = this.doc; |
+ } |
+ doc = load(docRef, "doc", "hc_staff"); |
- } |
- |
+ success = false; |
+ try { |
+ badPI = doc.createProcessingInstruction("invalid^Name","data"); |
+ } catch(ex) { |
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5); |
+ } |
+ assertTrue("throw_INVALID_CHARACTER_ERR",success); |
} |