Bug 1914685 - [wpt-sync] Update web-platform-tests to 26c88095d89792c886494e30c85aca3...
[gecko.git] / layout / style / test / test_any_dynamic.html
blob9c9a9e2a3f3c061c96208c7a788f90071557c094
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=544834
5 -->
6 <head>
7 <title>Test for Bug 544834</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">
12 :-moz-any(#display, #display2) { text-decoration-line: underline }
13 p:-moz-any([foo], [bar]) { z-index: 17 }
15 </style>
16 </head>
17 <body onload="run()">
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=544834">Mozilla Bug 544834</a>
19 <p id="display" style="position:absolute"></p>
20 <pre id="test">
21 <script type="application/javascript">
23 /**
24 * Test for Bug 544834
26 * In particular, test that we go through :-moz-any() in AddRule.
29 function run()
31 var p = document.getElementById("display");
32 var cs = getComputedStyle(p, "");
33 is(cs.textDecorationLine, "underline", "should match first rule");
34 is(cs.zIndex, "auto", "should not match second rule");
35 p.removeAttribute("id");
36 is(cs.textDecorationLine, "none", "should not match first rule");
37 is(cs.zIndex, "auto", "should not match second rule");
38 p.setAttribute("foo", "v");
39 is(cs.textDecorationLine, "none", "should not match first rule");
40 is(cs.zIndex, "17", "should match second rule");
41 SimpleTest.finish();
44 SimpleTest.waitForExplicitFinish();
46 </script>
47 </pre>
48 </body>
49 </html>