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

Unified Diff: LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js

Issue 740223003: Revive tests for Document.createAttributeNS() and Element.setAttributeNodeNS() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deprecation messages Created 6 years, 1 month 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/xhtml/level3/core/nodelookupprefix16.js
diff --git a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js
similarity index 78%
copy from LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js
copy to LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.js
index 2c6b8ef1a5d2ba60a8ce5adad2ee30e015b5e05f..8a07de86c89b3ae39ab27b2636451ff312fbb77a 100644
--- a/LayoutTests/dom/xhtml/level3/core/nodegettextcontent12.js
+++ b/LayoutTests/dom/xhtml/level3/core/nodelookupprefix16.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/nodegettextcontent12";
+ return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodelookupprefix16";
}
var docsLoaded = -1000000;
@@ -75,40 +75,38 @@ function loadComplete() {
/**
*
- Invoke the method getTextContent on a new Comment node and check if the value returned
- is the Comments data.
+ Invoke lookupPrefix on a new Attribute node with with a namespace URI
+ and prefix and verify if the prefix returned is null.
* @author IBM
-* @author Neil Delima
-* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-textContent
+* @author Jenny Hsu
+* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-lookupNamespacePrefix
*/
-function nodegettextcontent12() {
+function nodelookupprefix16() {
var success;
- if(checkInitialization(builder, "nodegettextcontent12") != null) return;
+ if(checkInitialization(builder, "nodelookupprefix16") != null) return;
var doc;
- var elemList;
var elem;
- var comment;
- var textContent;
- var appendedChild;
+ var attr;
+ var prefix;
+ var attNode;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "barfoo");
- elem = doc.createElementNS("http://www.w3.org/1999/xhtml","body");
- comment = doc.createComment("Comment");
- appendedChild = elem.appendChild(comment);
- textContent = comment.textContent;
-
- assertEquals("nodegettextcontent12","Comment",textContent);
-
+ elem = doc.createElementNS("http://www.w3.org/1999/xhtml","dom3:p");
+ attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","xml:lang");
+ attNode = elem.setAttributeNodeNS(attr);
+ prefix = attr.lookupPrefix("http://www.w3.org/XML/1998/namespace");
+ assertNull("nodelookupprefix16",prefix);
+
}
function runTest() {
- nodegettextcontent12();
+ nodelookupprefix16();
}

Powered by Google App Engine
This is Rietveld 408576698