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

Side by Side 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: Added layout testcases for XML and HTML documents 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script>
6 function getBackgroundStyle(id) {
7 return document.getElementById(id).style.background;
8 }
9 function getAttributesLength(id) {
10 return document.getElementById(id).attributes.length;
11 }
12 function runTest() {
13 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.\nThe issue can be manually verified by asc ertaining that a green colored block is displayed instead of a red one.');
14
15 var testElement = document.getElementById('test');
16 var newAttr = document.createAttribute("STYLE");
17 newAttr.value = "background-color: green;";
18 testElement.setAttributeNode(newAttr);
19
20 shouldBe("getAttributesLength('test')", '2');
arv (Not doing code reviews) 2013/08/29 13:45:21 Why not? shouldBe('testElement.attributes.length'
arpitab_ 2013/08/29 14:11:01 Done.
21 shouldBe("getBackgroundStyle('test')", "'green'");
22
23 testElement.style.display = 'none';
24 isSuccessfullyParsed();
arv (Not doing code reviews) 2013/08/29 13:45:21 remove
arpitab_ 2013/08/29 14:11:01 Done.
25 }
26 </script>
27 </head>
28 <body onload="runTest();">
arv (Not doing code reviews) 2013/08/29 13:45:21 remove onload and move the script block to after t
arpitab_ 2013/08/29 14:11:01 Done.
29 <div id="description"></div>
arv (Not doing code reviews) 2013/08/29 13:45:21 remove
arpitab_ 2013/08/29 14:11:01 Done.
30 <div id="test" style="background-color: red;"/>&nbsp;</div>
31 <div id="console"></div>
arv (Not doing code reviews) 2013/08/29 13:45:21 remove
arpitab_ 2013/08/29 14:11:01 Done.
32 </body>
arv (Not doing code reviews) 2013/08/29 13:45:21 Missing <script src="../../js/resources/js-test-
arpitab_ 2013/08/29 14:11:01 Done.
33 </html>
OLDNEW
« 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