michael@0: michael@0: SimpleTest.waitForExplicitFinish(); michael@0: michael@0: window.addEventListener("load", runTests, false); michael@0: michael@0: function runTests(event) michael@0: { michael@0: if (event.target != document) { michael@0: return; michael@0: } michael@0: michael@0: var elt = document.getElementById("content"); michael@0: michael@0: elt.setAttribute("style", "color: blue; background-color: fuchsia"); michael@0: is(elt.style.color, "blue", michael@0: "setting correct style attribute (color)"); michael@0: is(elt.style.backgroundColor, "fuchsia", michael@0: "setting correct style attribute (color)"); michael@0: michael@0: elt.setAttribute("style", "{color: blue; background-color: fuchsia}"); michael@0: is(elt.style.color, "", michael@0: "setting braced style attribute (color)"); michael@0: is(elt.style.backgroundColor, "", michael@0: "setting braced style attribute (color)"); michael@0: michael@0: SimpleTest.finish(); michael@0: }