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

Unified Diff: LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html

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/fast/dom/Element/setAttributeNode-case-insensitivity.html
diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html
index 68f202bfefc24f1e0889bbb88f2ee407438cd3c0..6fe0d5b69f4f476ced53d0653e9bee29a65fb7c0 100644
--- a/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html
@@ -15,6 +15,34 @@ function runTest()
shouldBe("test.getAttribute('style')", "test.getAttribute('STYLE')");
shouldBe("test.getAttributeNode('style').value", "test.getAttributeNode('STYLE').value");
}
+
+ debug("Verifying that attributes with the same name but different namespaces are treated as unique entities. For the following test two different attribute values should be returned.");
+ var newAttr1 = document.createAttributeNS("ns1", "newattr");
+ newAttr1.prefix = "prefix1";
+ newAttr1.value = "newattr1";
+ test.setAttributeNode(newAttr1);
+ var newAttr2 = document.createAttributeNS("ns2", "newattr");
+ newAttr2.prefix = "prefix2";
+ newAttr2.value = "newattr2";
+ test.setAttributeNode(newAttr2);
+ if (window.testRunner) {
+ shouldBe("test.getAttributeNodeNS('ns1', 'newattr').value", "'newattr1'");
+ shouldBe("test.getAttributeNodeNS('ns2', 'newattr').value", "'newattr2'");
+ }
+
+ debug("Verifying that attributes with same name but different case and having same namespaces are treated as same. In the following test the new attribute should overwrite the value of the existing one.");
+ var newAttr3 = document.createAttributeNS("ns1", "NEWATTR");
+ newAttr3.prefix = "prefix2";
+ newAttr3.value = "newattr3";
+ test.setAttributeNode(newAttr3);
+
+ if (window.testRunner) {
+ shouldBe("test.getAttributeNodeNS('ns1', 'newattr').value", "'newattr3'");
+
+ isSuccessfullyParsed();
+ test.style.display = 'none';
+ }
+
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698