layout/style/test/style_attribute_tests.js

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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