tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug635286.html (1637B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=635286
      5 -->
      6 <head>
      7  <title>Test for Bug 635286</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10  <style type="text/css">
     11    div { background: transparent; }
     12    :-moz-any(#case1.before)      { background: gray; }
     13    #case2:not(.after)            { background: gray; }
     14    :-moz-any(#case3:not(.after)) { background: gray; }
     15    #case4:not(:-moz-any(.after)) { background: gray; }
     16  </style>
     17 </head>
     18 <body>
     19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=635286">Mozilla Bug 635286</a>
     20 <div id="case1" class="before">case1, :-moz-any()</div>
     21 <div id="case2" class="before">case2, :not()</div>
     22 <div id="case3" class="before">case3, :not() in :-moz-any()</div>
     23 <div id="case4" class="before">case4, :-moz-any() in :not()</div>
     24 <pre id="test">
     25 <script class="testbody" type="text/javascript">
     26 
     27 /** Test for Bug 635286 */
     28 
     29 window.addEventListener("load", function() {
     30  var cases = Array.from(document.getElementsByTagName("div"));
     31  cases.forEach(function(aCase, aIndex) {
     32    aCase.className = "after";
     33  });
     34  window.setTimeout(function() {
     35    cases.forEach(function(aCase, aIndex) {
     36      is(window.getComputedStyle(aCase)
     37           .getPropertyValue("background-color"),
     38         "rgba(0, 0, 0, 0)",
     39         aCase.textContent);
     40    });
     41    SimpleTest.finish();
     42  }, 1);
     43 });
     44 
     45 SimpleTest.waitForExplicitFinish();
     46 SimpleTest.requestFlakyTimeout("untriaged");
     47 
     48 </script>
     49 </pre>
     50 </body>
     51 </html>