|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=591198 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 591198</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"> |
|
10 </head> |
|
11 <body onload="gen.next();"> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=591198">Mozilla Bug 591198</a> |
|
13 <iframe id=iframe></iframe> |
|
14 <pre id="test"> |
|
15 <script class="testbody" type="text/javascript;version=1.8"> |
|
16 |
|
17 SimpleTest.waitForExplicitFinish(); |
|
18 |
|
19 gen = runTest(); |
|
20 |
|
21 function runTest() { |
|
22 let iframe = $('iframe'); |
|
23 window.addEventListener("message", function(e) { |
|
24 gen.send(JSON.parse(e.data)); |
|
25 }, false); |
|
26 |
|
27 iframe.src = "file_bug591198_inner.html"; |
|
28 let res = (yield); |
|
29 is(res.widths[0], res.widths[2], "binding was rendered"); |
|
30 isnot(res.widths[0], res.widths[1], "binding was rendered"); |
|
31 is(res.anonChildCount, 2, "correct number of anon children"); |
|
32 |
|
33 iframe.src = "http://noxul.example.com/tests/dom/xbl/test/file_bug591198_inner.html"; |
|
34 let res = (yield); |
|
35 is(res.widths[0], res.widths[1], "binding was not rendered"); |
|
36 isnot(res.widths[0], res.widths[2], "binding was not rendered"); |
|
37 is("anonChildCount" in res, false, "no anon children"); |
|
38 |
|
39 SimpleTest.finish(); |
|
40 yield undefined; |
|
41 } |
|
42 |
|
43 </script> |
|
44 </pre> |
|
45 </body> |
|
46 </html> |