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

Unified Diff: LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html

Issue 253843002: Deprecate Attr.nodeValue / Attr.textContent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline more tests Created 6 years, 8 months 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/fast/dom/Attr/change-id-via-attr-node-value.html
diff --git a/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html
index 7b12538e8526d076af8f9ca5b07085204981fdee..8faaaab3a263f28ed1cc7c093daa880e00dc68fa 100644
--- a/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html
+++ b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html
@@ -11,31 +11,31 @@ description("Test that different ways of changing an element's id all work prope
debug("\n1. Check id after parsing.");
shouldBe('document.getElementById("a")', 'document.body');
shouldBe('document.body.id', '"a"');
-shouldBe('document.body.getAttributeNode("id").textContent', '"a"');
+shouldBe('document.body.getAttributeNode("id").value', '"a"');
debug("\n2. Change Attr.value.");
document.body.getAttributeNode("id").value = "b";
shouldBe('document.getElementById("a")', 'null');
shouldBe('document.getElementById("b")', 'document.body');
-shouldBe('document.body.getAttributeNode("id").textContent', '"b"');
+shouldBe('document.body.getAttributeNode("id").value', '"b"');
debug("\n3. Change HTMLElement.id.");
document.body.id = "c";
shouldBe('document.getElementById("b")', 'null');
shouldBe('document.getElementById("c")', 'document.body');
-shouldBe('document.body.getAttributeNode("id").textContent', '"c"');
+shouldBe('document.body.getAttributeNode("id").value', '"c"');
debug("\n4. Change id attribute via setAttribute().");
document.body.setAttribute("id", "d");
shouldBe('document.getElementById("c")', 'null');
shouldBe('document.getElementById("d")', 'document.body');
-shouldBe('document.body.getAttributeNode("id").textContent', '"d"');
+shouldBe('document.body.getAttributeNode("id").value', '"d"');
debug("\n5. Change id attribute via setAttributeNS().");
document.body.setAttributeNS(null, "id", "e");
shouldBe('document.getElementById("d")', 'null');
shouldBe('document.getElementById("e")', 'document.body');
-shouldBe('document.body.getAttributeNode("id").textContent', '"e"');
+shouldBe('document.body.getAttributeNode("id").value', '"e"');
var attrNode = document.body.getAttributeNode("id");
@@ -45,7 +45,7 @@ shouldBe('document.getElementById("e")', 'null');
shouldBe('document.getElementById("f")', 'document.body');
shouldBe('document.body.id', '"f"');
shouldBe('document.body.getAttribute("id")', '"f"');
-shouldBe('attrNode.textContent', '"f"');
+shouldBe('attrNode.value', '"f"');
shouldBe('attrNode.childNodes.length', '1');
// Firefox doesn't support these for Attr nodes.
@@ -56,7 +56,7 @@ try {
shouldBe('document.getElementById("g")', 'document.body');
shouldBe('document.body.id', '"g"');
shouldBe('document.body.getAttribute("id")', '"g"');
- shouldBe('attrNode.textContent', '"g"');
+ shouldBe('attrNode.value', '"g"');
shouldBe('attrNode.childNodes.length', '1');
} catch (ex) {
debug(ex);
@@ -69,7 +69,7 @@ try {
shouldBe('document.getElementById("0g")', 'document.body');
shouldBe('document.body.id', '"0g"');
shouldBe('document.body.getAttribute("id")', '"0g"');
- shouldBe('attrNode.textContent', '"0g"');
+ shouldBe('attrNode.value', '"0g"');
shouldBe('attrNode.childNodes.length', '2');
} catch (ex) {
debug(ex);
@@ -82,7 +82,7 @@ try {
shouldBe('document.getElementById("0g2")', 'document.body');
shouldBe('document.body.id', '"0g2"');
shouldBe('document.body.getAttribute("id")', '"0g2"');
- shouldBe('attrNode.textContent', '"0g2"');
+ shouldBe('attrNode.value', '"0g2"');
shouldBe('attrNode.childNodes.length', '3');
} catch (ex) {
debug(ex);
@@ -96,7 +96,7 @@ shouldBe('document.getElementById("h")', 'null');
shouldBe('document.getElementById("")', 'null');
shouldBe('document.body.id', '""');
shouldBe('document.body.getAttribute("id")', '""');
-shouldBe('document.body.getAttributeNode("id").textContent', '""');
+shouldBe('document.body.getAttributeNode("id").value', '""');
debug("\n11. Changing Text.nodeValue.");
attrNode.nodeValue = "h";
@@ -105,16 +105,16 @@ shouldBe('attrNode.firstChild.nodeValue', '"i"');
shouldBe('document.getElementById("i")', 'document.body');
shouldBe('document.body.id', '"i"');
shouldBe('document.body.getAttribute("id")', '"i"');
-shouldBe('attrNode.textContent', '"i"');
+shouldBe('attrNode.value', '"i"');
shouldBe('attrNode.childNodes.length', '1');
-debug("\n12. Chnaging Attr.textContent.");
-attrNode.textContent = "hi";
+debug("\n12. Chnaging Attr.value.");
+attrNode.value = "hi";
shouldBe('document.getElementById("i")', 'null');
shouldBe('document.getElementById("hi")', 'document.body');
shouldBe('document.body.id', '"hi"');
shouldBe('document.body.getAttribute("id")', '"hi"');
-shouldBe('attrNode.textContent', '"hi"');
+shouldBe('attrNode.value', '"hi"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n13. Text.splitText().");
@@ -122,7 +122,7 @@ attrNode.firstChild.splitText(1);
shouldBe('document.getElementById("hi")', 'document.body');
shouldBe('document.body.id', '"hi"');
shouldBe('document.body.getAttribute("id")', '"hi"');
-shouldBe('document.body.getAttributeNode("id").textContent', '"hi"');
+shouldBe('document.body.getAttributeNode("id").value', '"hi"');
shouldBe('document.body.getAttributeNode("id").childNodes.length', '2');
debug("\n14. Node.normalize(), joining text nodes.");
@@ -130,7 +130,7 @@ attrNode.normalize();
shouldBe('document.getElementById("hi")', 'document.body');
shouldBe('document.body.id', '"hi"');
shouldBe('document.body.getAttribute("id")', '"hi"');
-shouldBe('document.body.getAttributeNode("id").textContent', '"hi"');
+shouldBe('document.body.getAttributeNode("id").value', '"hi"');
shouldBe('document.body.getAttributeNode("id").childNodes.length', '1');
debug("\n15. Changing Attr.nodeValue.");
@@ -140,7 +140,7 @@ shouldBe('document.getElementById("hi")', 'null');
shouldBe('document.getElementById("j")', 'document.body');
shouldBe('document.body.id', '"j"');
shouldBe('document.body.getAttribute("id")', '"j"');
-shouldBe('attrNode.textContent', '"j"');
+shouldBe('attrNode.value', '"j"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n16. Changing Text.data.");
@@ -149,7 +149,7 @@ shouldBe('document.getElementById("j")', 'null');
shouldBe('document.getElementById("k")', 'document.body');
shouldBe('document.body.id', '"k"');
shouldBe('document.body.getAttribute("id")', '"k"');
-shouldBe('attrNode.textContent', '"k"');
+shouldBe('attrNode.value', '"k"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n17. Changing text child with appendData().");
@@ -158,7 +158,7 @@ shouldBe('document.getElementById("k")', 'null');
shouldBe('document.getElementById("kl")', 'document.body');
shouldBe('document.body.id', '"kl"');
shouldBe('document.body.getAttribute("id")', '"kl"');
-shouldBe('attrNode.textContent', '"kl"');
+shouldBe('attrNode.value', '"kl"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n18. Changing text child with insertData().");
@@ -167,7 +167,7 @@ shouldBe('document.getElementById("kl")', 'null');
shouldBe('document.getElementById("k1l")', 'document.body');
shouldBe('document.body.id', '"k1l"');
shouldBe('document.body.getAttribute("id")', '"k1l"');
-shouldBe('attrNode.textContent', '"k1l"');
+shouldBe('attrNode.value', '"k1l"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n19. Changing text child with deleteData().");
@@ -176,7 +176,7 @@ shouldBe('document.getElementById("k1l")', 'null');
shouldBe('document.getElementById("l")', 'document.body');
shouldBe('document.body.id', '"l"');
shouldBe('document.body.getAttribute("id")', '"l"');
-shouldBe('attrNode.textContent', '"l"');
+shouldBe('attrNode.value', '"l"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n20. Changing text child with replaceData().");
@@ -185,7 +185,7 @@ shouldBe('document.getElementById("l")', 'null');
shouldBe('document.getElementById("mn")', 'document.body');
shouldBe('document.body.id', '"mn"');
shouldBe('document.body.getAttribute("id")', '"mn"');
-shouldBe('attrNode.textContent', '"mn"');
+shouldBe('attrNode.value', '"mn"');
shouldBe('attrNode.childNodes.length', '1');
debug("\n21. Remove an Attr node.");

Powered by Google App Engine
This is Rietveld 408576698