Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js

Issue 100433004: Sync Document.createProcessingInstruction() with spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test createProcessingInstruction for HTML doc Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js
diff --git a/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js b/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js
index fb6104d602b1888818c93be35aec372823c11b8a..73174bf3a21208c431e6c8b8535d53e5ae855c7a 100644
--- a/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js
+++ b/LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js
@@ -86,50 +86,23 @@ Creating a processing instruction with an empty target should cause an INVALID_C
*/
function documentinvalidcharacterexceptioncreatepi1() {
var 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");
-
- 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("","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("","data");
+ } catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 5);
+ }
+ assertTrue("throw_INVALID_CHARACTER_ERR",success);
}

Powered by Google App Engine
This is Rietveld 408576698