Bug 591198: Display element using normal layout rules if XBL binding fails for securi...
[mozilla-central.git] / content / xbl / test / test_bug591198.html
blobf10774604581c0d880c407f8d945d20d4c683b0f
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="/MochiKit/packed.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
11 </head>
12 <body onload="gen.next();">
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=591198">Mozilla Bug 591198</a>
14 <iframe id=iframe></iframe>
15 <pre id="test">
16 <script class="testbody" type="text/javascript;version=1.8">
18 SimpleTest.waitForExplicitFinish();
20 gen = runTest();
22 function runTest() {
23 let iframe = $('iframe');
24 window.addEventListener("message", function(e) {
25 gen.send(JSON.parse(e.data));
26 }, false);
28 iframe.src = "file_bug591198_inner.html";
29 let res = (yield);
30 is(res.widths[0], res.widths[2], "binding was rendered");
31 isnot(res.widths[0], res.widths[1], "binding was rendered");
32 is(res.anonChildCount, 2, "correct number of anon children");
34 iframe.src = "http://noxul.example.com/tests/content/xbl/test/file_bug591198_inner.html";
35 let res = (yield);
36 is(res.widths[0], res.widths[1], "binding was not rendered");
37 isnot(res.widths[0], res.widths[2], "binding was not rendered");
38 is("anonChildCount" in res, false, "no anon children");
40 SimpleTest.finish();
41 yield;
44 </script>
45 </pre>
46 </body>
47 </html>