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

Unified Diff: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html

Issue 22842013: setAttributeNode() does not set the new value to an existing attribute if specified attribute is in… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified for fixing the crash Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html
diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html
new file mode 100644
index 0000000000000000000000000000000000000000..c9ef03b523e9051fb2ece16af16f0123a0f99138
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function runTest() {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var testElement = document.getElementById('test');
+ var testElementBgColor = testElement.style.background;
+
+ var newAttr = document.createAttribute("STYLE");
+ newAttr.value = "background-color: green";
+ testElement.setAttributeNode(newAttr);
+ var testElementBgColorAfterReset = testElement.style.background;
+
+ document.getElementById('result').innerHTML = "background-color specified with lowercase style attribute was: "+testElementBgColor+" and specified with uppercase style attribute is: "+testElementBgColorAfterReset;
+}
+</script>
+</head>
+<body onload="runTest();">
+<div>Testcase for bug <a href="http://crbug.com/279193">279193</a>: setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.\nThe issue can be manually verified by ascertaining that a green colored block is displayed instead of a red one.</div>
+<div id="test" style="background-color: red;"/>&nbsp;</div>
+<div id="result"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698