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

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

Issue 22803008: setAttributeNode() does not properly normalize case. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: submitting patch with small name changes. Created 7 years, 4 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/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
new file mode 100644
index 0000000000000000000000000000000000000000..f01330c5a01bc0b20944c539cbdb04bd05f0accf
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<script>
+function runTest()
+{
+ if (window.testRunner) {
+ window.testRunner.dumpAsText();
+
+ var test = document.getElementById("test");
+ var newStyleAttr = document.createAttribute("STYLE");
+ newStyleAttr.value = "background-color: green";
+ test.setAttributeNode(newStyleAttr);
+
+ document.getElementById('result').innerHTML = "style attribute value = "+test.getAttributeNode('style').value+" and STYLE attribute value = "+test.getAttributeNode('STYLE').value;
+
+ test.style.display = 'none';
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<div>Test for Bugzilla bug:<a href="https://bugs.webkit.org/show_bug.cgi?id=90341"> 90341:</a> createAttribute/setAttributeNode does not properly normalize case.</div>
+<div>This test verifies that the setAttributeNode() API allows for creation of attributes case-sensitively for XHTML documents. Thus two different attributes with the same name but in different case can exist for XHTML documents.</div>
+<div id="test" style="background-color: red">&nbsp;</div>
+<br/>
+<div id="result"></div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698