Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / test_bug635286.html
blob80ea5a98ef8e8f4c13239a5d13a86a5b35a8c3d7
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 type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <style type="text/css">
12 div { background: transparent; }
13 :-moz-any(#case1.before) { background: gray; }
14 #case2:not(.after) { background: gray; }
15 :-moz-any(#case3:not(.after)) { background: gray; }
16 #case4:not(:-moz-any(.after)) { background: gray; }
17 </style>
18 </head>
19 <body>
20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=635286">Mozilla Bug 635286</a>
21 <div id="case1" class="before">case1, :-moz-any()</div>
22 <div id="case2" class="before">case2, :not()</div>
23 <div id="case3" class="before">case3, :not() in :-moz-any()</div>
24 <div id="case4" class="before">case4, :-moz-any() in :not()</div>
25 <pre id="test">
26 <script class="testbody" type="text/javascript">
28 /** Test for Bug 635286 **/
30 window.addEventListener("load", function() {
31 var cases = Array.from(document.getElementsByTagName("div"));
32 cases.forEach(function(aCase, aIndex) {
33 aCase.className = "after";
34 });
35 window.setTimeout(function() {
36 cases.forEach(function(aCase, aIndex) {
37 is(window.getComputedStyle(aCase)
38 .getPropertyValue("background-color"),
39 "rgba(0, 0, 0, 0)",
40 aCase.textContent);
41 });
42 SimpleTest.finish();
43 }, 1);
44 });
46 SimpleTest.waitForExplicitFinish();
47 SimpleTest.requestFlakyTimeout("untriaged");
49 </script>
50 </pre>
51 </body>
52 </html>