blob: 866e277c8d00ed9e3bf6a4bddae2bfd56c75e7a5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
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.");
var e = document.createElement("span");
e.setAttribute("style", "background-color: white;");
var styleAttr = e.getAttributeNode("style");
shouldBe("styleAttr.value", "'background-color: white;'");
e.style.backgroundColor = 'green';
shouldBe("styleAttr.value", "'background-color: green;'");
e.style.backgroundColor = 'red';
var oldStyleAttr = e.setAttributeNode(document.createAttribute("style"));
shouldBe("oldStyleAttr.value", "'background-color: red;'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>