From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- layout/style/test/style_attribute_tests.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 layout/style/test/style_attribute_tests.js (limited to 'layout/style/test/style_attribute_tests.js') diff --git a/layout/style/test/style_attribute_tests.js b/layout/style/test/style_attribute_tests.js new file mode 100644 index 000000000..be24baf95 --- /dev/null +++ b/layout/style/test/style_attribute_tests.js @@ -0,0 +1,27 @@ + +SimpleTest.waitForExplicitFinish(); + +window.addEventListener("load", runTests, false); + +function runTests(event) +{ + if (event.target != document) { + return; + } + + var elt = document.getElementById("content"); + + elt.setAttribute("style", "color: blue; background-color: fuchsia"); + is(elt.style.color, "blue", + "setting correct style attribute (color)"); + is(elt.style.backgroundColor, "fuchsia", + "setting correct style attribute (color)"); + + elt.setAttribute("style", "{color: blue; background-color: fuchsia}"); + is(elt.style.color, "", + "setting braced style attribute (color)"); + is(elt.style.backgroundColor, "", + "setting braced style attribute (color)"); + + SimpleTest.finish(); +} -- cgit v1.2.3