|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 --> |
|
5 <head> |
|
6 <title>Test for creating XUL elements, bug 590870</title> |
|
7 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
9 </head> |
|
10 <body onload="gen.next()"> |
|
11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=590870">Mozilla Bug 590870</a> |
|
12 <p id="display"></p> |
|
13 <iframe id=iframe></iframe> |
|
14 <pre id="test"> |
|
15 <script class="testbody" type="application/javascript;version=1.8"> |
|
16 |
|
17 SimpleTest.waitForExplicitFinish(); |
|
18 window.addEventListener("message", function(e) { gen.send(e.data) }, false); |
|
19 |
|
20 var gen = runTest(); |
|
21 |
|
22 function runTest() { |
|
23 var iframe = $('iframe'); |
|
24 iframe.src = "http://noxul.example.com/tests/content/base/test/file_bug590870.html"; |
|
25 is((yield), true, "shouldn't be able to create XUL elements"); |
|
26 |
|
27 iframe.src = "file_bug590870.html"; |
|
28 is((yield), false, "should be able to create XUL elements"); |
|
29 |
|
30 SimpleTest.finish(); |
|
31 yield undefined; |
|
32 } |
|
33 |
|
34 </script> |
|
35 </pre> |
|
36 </body> |
|
37 </html> |