layout/style/test/test_computed_style_no_pseudo.html

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.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=505515
     5 -->
     6 <head>
     7   <title>Test for Bug 505515</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <style type="text/css">
    12   #display { color: black; background: white; }
    13   #display:first-line { color: blue; }
    15   </style>
    16 </head>
    17 <body onload="run()">
    18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=505515">Mozilla Bug 505515</a>
    19 <p id="display" style="width: 30em">This <span id="sp">is</span> some text in which the first line is in a different color.</p>
    20 <pre id="test">
    21 <script type="application/javascript">
    23 SimpleTest.waitForExplicitFinish();
    25 /** Test for Bug 505515 **/
    27 function run() {
    28   var p = document.getElementById("display");
    29   var span = document.getElementById("sp");
    31   isnot(span.offsetWidth, 0,
    32         "span should have width (and we flushed layout)");
    33   is(getComputedStyle(span, "").color, "rgb(0, 0, 0)",
    34      "span should be black");
    35   is(getComputedStyle(p, "").color, "rgb(0, 0, 0)",
    36      "p should be black too");
    38   SimpleTest.finish();
    39 }
    41 </script>
    42 </pre>
    43 </body>
    44 </html>

mercurial