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

Side by Side Diff: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-html.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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script>
6 description('Testcase for bug <a href="http://crbug.com/279193">279193</a>: setAttributeNode() does not set the new value to an existing attribute if specif ied attribute is in a different case.\nThis testcase verifies that attributes wi th the same name but in different case are overwritten for HTML documents.');
7
8 var doc = document.implementation.createHTMLDocument('');
9 doc.documentElement.setAttribute('x', 'x');
10
11 var attr = doc.createAttribute('X');
12 attr.value = 'X';
13 doc.documentElement.setAttributeNode(attr);
14
15 shouldBe('doc.documentElement.attributes.length', '1');
16 shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'X');
17 shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'X');
18
19 var attr2 = doc.createAttribute('X');
20 attr2.value = 'Y';
21 doc.documentElement.setAttributeNode(attr2);
22
23 shouldBe('doc.documentElement.attributes.length', '1');
24 shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'Y');
25 shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'Y');
26 </script>
27 </head>
28 <body>
arv (Not doing code reviews) 2013/08/29 14:18:16 This should also have a js-test-post
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698