layout/style/test/test_bug525952.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=525952
     5 -->
     6 <head>
     7   <title>Test for Bug 525952</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 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=525952">Mozilla Bug 525952</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script type="application/javascript">
    20 /** Test for Bug 525952 **/
    21 var bodies = document.querySelectorAll("::before, div::before, body");
    22 is(bodies.length, 1, "Unexpected length");
    23 is(bodies[0], document.body, "Unexpected element");
    25 is(document.querySelector("div > ::after, body"), document.body,
    26    "Unexpected return value");
    28 var emptyList = document.querySelectorAll("::before, div::before");
    29 is(emptyList.length, 0, "Unexpected empty list length");
    31 is(document.querySelectorAll("div > ::after").length, 0,
    32    "Pseudo-element matched something?");
    34 is(document.body.mozMatchesSelector("::first-line"), false,
    35    "body shouldn't match ::first-line");
    37 is(document.body.mozMatchesSelector("::first-line, body"), true,
    38    "body should match 'body'");
    40 is(document.body.mozMatchesSelector("::first-line, body, ::first-letter"), true,
    41    "body should match 'body' here too");
    43 </script>
    44 </pre>
    45 </body>
    46 </html>

mercurial