| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../js/resources/js-test-pre.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 description("This test verifies that acquiring the 'style' attribute via a DOM A
ttr node still works correctly after the inline style has been modified through
the CSSOM API."); | 10 description("This test verifies that acquiring the 'style' attribute via a DOM A
ttr node still works correctly after the inline style has been modified through
the CSSOM API."); |
| 11 | 11 |
| 12 var e = document.createElement("span"); | 12 var e = document.createElement("span"); |
| 13 e.setAttribute("style", "background-color: white;"); | 13 e.setAttribute("style", "background-color: white;"); |
| 14 var styleAttr = e.getAttributeNode("style"); | 14 var styleAttr = e.getAttributeNode("style"); |
| 15 shouldBe("styleAttr.value", "'background-color: white;'"); | 15 shouldBe("styleAttr.value", "'background-color: white;'"); |
| 16 e.style.backgroundColor = 'green'; | 16 e.style.backgroundColor = 'green'; |
| 17 shouldBe("styleAttr.value", "'background-color: green;'"); | 17 shouldBe("styleAttr.value", "'background-color: green;'"); |
| 18 | 18 |
| 19 e.style.backgroundColor = 'red'; | 19 e.style.backgroundColor = 'red'; |
| 20 var oldStyleAttr = e.setAttributeNode(document.createAttribute("style")); | 20 var oldStyleAttr = e.setAttributeNode(document.createAttribute("style")); |
| 21 shouldBe("oldStyleAttr.value", "'background-color: red;'"); | 21 shouldBe("oldStyleAttr.value", "'background-color: red;'"); |
| 22 | 22 |
| 23 </script> | 23 </script> |
| 24 <script src="../js/resources/js-test-post.js"></script> | |
| 25 </body> | 24 </body> |
| 26 </html> | 25 </html> |
| OLD | NEW |