Bug 1914685 - [wpt-sync] Update web-platform-tests to 26c88095d89792c886494e30c85aca3...
[gecko.git] / layout / style / test / style_attribute_tests.js
blob243ec3380d33792ab16bb13d6c61fd29728e0be6
1 SimpleTest.waitForExplicitFinish();
3 window.addEventListener("load", runTests);
5 function runTests(event) {
6   if (event.target != document) {
7     return;
8   }
10   var elt = document.getElementById("content");
12   elt.setAttribute("style", "color: blue; background-color: fuchsia");
13   is(elt.style.color, "blue", "setting correct style attribute (color)");
14   is(
15     elt.style.backgroundColor,
16     "fuchsia",
17     "setting correct style attribute (color)"
18   );
20   elt.setAttribute("style", "{color: blue; background-color: fuchsia}");
21   is(elt.style.color, "", "setting braced style attribute (color)");
22   is(elt.style.backgroundColor, "", "setting braced style attribute (color)");
24   SimpleTest.finish();