layout/style/test/style_attribute_tests.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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