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

Unified Diff: LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.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
« no previous file with comments | « no previous file | LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | LayoutTests/dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698