Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / attr-style-too-lazy.html
blob6cc8dfd22dce8e6a7090a2035b31e4ea0df84b23
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
10 description("This test verifies that acquiring the 'style' attribute via a DOM Attr node still works correctly after the inline style has been modified through the CSSOM API.");
12 var e = document.createElement("span");
13 e.setAttribute("style", "background-color: white;");
14 var styleAttr = e.getAttributeNode("style");
15 shouldBe("styleAttr.value", "'background-color: white;'");
16 e.style.backgroundColor = 'green';
17 shouldBe("styleAttr.value", "'background-color: green;'");
19 e.style.backgroundColor = 'red';
20 var oldStyleAttr = e.setAttributeNode(document.createAttribute("style"));
21 shouldBe("oldStyleAttr.value", "'background-color: red;'");
23 </script>
24 </body>
25 </html>