fune/layout/style/test/style_attribute_tests.js
Victor Porof 6a261b9e77 Bug 1561435 - Format layout/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35927

--HG--
extra : source : b9cc96337c05dbb9a9f811c63dcc5fd63588d652
2019-07-05 10:50:41 +02:00

25 lines
704 B
JavaScript

SimpleTest.waitForExplicitFinish();
window.addEventListener("load", runTests);
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();
}