Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
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 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 :-moz-any(#display, #display2) { text-decoration: 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
25 *
26 * In particular, test that we go through :-moz-any() in AddRule.
27 */
29 function run()
30 {
31 var p = document.getElementById("display");
32 var cs = getComputedStyle(p, "");
33 is(cs.textDecoration, "underline", "should match first rule");
34 is(cs.zIndex, "auto", "should not match second rule");
35 p.removeAttribute("id");
36 is(cs.textDecoration, "none", "should not match first rule");
37 is(cs.zIndex, "auto", "should not match second rule");
38 p.setAttribute("foo", "v");
39 is(cs.textDecoration, "none", "should not match first rule");
40 is(cs.zIndex, "17", "should match second rule");
41 SimpleTest.finish();
42 }
44 SimpleTest.waitForExplicitFinish();
46 </script>
47 </pre>
48 </body>
49 </html>