1
0
Fork 0
firefox/layout/style/test/style_attribute_tests.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +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();
}