layout/style/test/style_attribute_tests.js

branch
TOR_BUG_9701
changeset 11
deefc01c0e14
equal deleted inserted replaced
-1:000000000000 0:778eb274119c
1
2 SimpleTest.waitForExplicitFinish();
3
4 window.addEventListener("load", runTests, false);
5
6 function runTests(event)
7 {
8 if (event.target != document) {
9 return;
10 }
11
12 var elt = document.getElementById("content");
13
14 elt.setAttribute("style", "color: blue; background-color: fuchsia");
15 is(elt.style.color, "blue",
16 "setting correct style attribute (color)");
17 is(elt.style.backgroundColor, "fuchsia",
18 "setting correct style attribute (color)");
19
20 elt.setAttribute("style", "{color: blue; background-color: fuchsia}");
21 is(elt.style.color, "",
22 "setting braced style attribute (color)");
23 is(elt.style.backgroundColor, "",
24 "setting braced style attribute (color)");
25
26 SimpleTest.finish();
27 }

mercurial