Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <html xmlns="http://www.w3.org/1999/xhtml" style="display: none">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=526178
4 -->
5 <head>
6 <title>Test for Bug 526178</title>
7 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
9 <style id="sheet">
10 #content * {
11 display: block;
12 -moz-binding: url("#binding");
13 }
14 </style>
15 <bindings xmlns="http://www.mozilla.org/xbl">
16 <binding id="binding">
17 <implementation>
18 <constructor>
19 var win = XPCNativeWrapper.unwrap(window);
20 win.logString += this.localName;
21 win.bindingDone();
22 </constructor>
23 </implementation>
24 </binding>
25 </bindings>
26 </head>
27 <body>
28 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=526178">Mozilla Bug 526178</a>
29 <div id="content">
30 <a>
31 <b>
32 <c/>
33 </b>
34 <d/>
35 <e style="display: inline">
36 <f style="display: inline">
37 <g style="display: inline"/>
38 <h style="display: none"/>
39 <i style="display: inline"/>
40 </f>
41 <j style="display: none"/>
42 <k style="display: inline">
43 <l style="display: inline"/>
44 <m/>
45 <n style="display: inline"/>
46 </k>
47 </e>
48 <o style="display: none"/>
49 <p/>
50 </a>
51 </div>
52 <p id="display">
53 </p>
54 <pre id="test">
55 <script type="application/javascript">
56 <![CDATA[
58 /** Test for Bug 526178 **/
59 var logString = "";
60 // Add one for the root
61 var pendingBindings = $("content").getElementsByTagName("*").length + 1;
62 function bindingDone() {
63 if (--pendingBindings == 0) {
64 is(logString, "apoeknmljfihgdbchtml");
65 SimpleTest.finish();
66 }
67 }
69 SimpleTest.waitForExplicitFinish();
71 // Have to add the rule for the root dynamically so the binding doesn't try
72 // to load before bindingDone() is defined.
73 $("sheet").sheet.insertRule(':root { -moz-binding: url("#binding"); }', 0);
74 document.documentElement.style.display = "";
76 ]]>
77 </script>
78 </pre>
79 </body>
80 </html>