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

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: modifying the layout testcase 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-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..6e61b783a85ac27e94880528a98f7e8a377e57f1
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="test" style="background-color: red;"/>&nbsp;</div>
arv (Not doing code reviews) 2013/08/29 14:18:16 Invalid HTML. Instead of using &nbsp; you could s
+<script>
+description('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.');
+
+var testElement = document.getElementById('test');
+var newAttr = document.createAttribute("STYLE");
+newAttr.value = "background-color: green;";
+testElement.setAttributeNode(newAttr);
+
+shouldBeEqualToString('testElement.attributes.length.toString()', '2');
+shouldBeEqualToString('testElement.style.background', 'green');
+
+testElement.style.display = 'none';
arv (Not doing code reviews) 2013/08/29 14:18:16 If you hide this your description is not accurate.
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698