layout/style/test/style_attribute_tests.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     2 SimpleTest.waitForExplicitFinish();
     4 window.addEventListener("load", runTests, false);
     6 function runTests(event)
     7 {
     8     if (event.target != document) {
     9         return;
    10     }
    12     var elt = document.getElementById("content");
    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)");
    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)");
    26     SimpleTest.finish();
    27 }

mercurial