Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <iframe></iframe> | |
| 8 <div id="test" style="background-color: red"></div> | |
| 9 <script> | |
| 10 description("Updating value of replaced attribute node"); | |
| 11 var element = document.getElementById("test"); | |
| 12 var attr = document.createAttribute("STYLE"); | |
| 13 // This aligns with Trident rather than Gecko. | |
|
adamk
2014/06/05 00:26:34
Sounds like we're getting no help from the DOM spe
sof
2014/06/05 06:58:26
Yes, thoroughly removed from sight there.
The set
| |
| 14 shouldBeEqualToString("replaced = element.setAttributeNode(attr); replaced.name" , "STYLE"); | |
| 15 shouldBeEqualToString("replaced.value", "background-color: red"); | |
| 16 shouldBeEqualToString("attr.name", "STYLE"); | |
| 17 shouldBeEqualToString("attr.value", ""); | |
| 18 shouldBeEqualToString("element.getAttribute('style')", ""); | |
| 19 shouldBeEqualToString("element.getAttribute('StyLE')", ""); | |
| 20 // Setting the value must correctly locate attribute on the element and update i t, | |
| 21 // even if the local name differs. PASS if no crash (crbug.com/376718) | |
| 22 shouldBeEqualToString("attr.value = 'background-color: green'; attr.value", "bac kground-color: green"); | |
| 23 shouldBeEqualToString("element.getAttribute('stylE')", "background-color: green" ); | |
| 24 </script> | |
| 25 </body> | |
| 26 </html> | |
| OLD | NEW |