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