Bug 1686668 [wpt PR 27185] - Update wpt metadata, a=testonly
[gecko.git] / dom / base / test / test_bug590870.html
blob621bb21cf5aa90fd48a4163932f59381556e865b
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 -->
5 <head>
6 <title>Test for creating XUL elements, bug 590870</title>
7 <script 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">
17 SimpleTest.waitForExplicitFinish();
18 window.addEventListener("message", function(e) { gen.next(e.data) });
20 var gen = runTest();
22 function* runTest() {
23 var iframe = $('iframe');
24 iframe.src = "http://noxul.example.com/tests/dom/base/test/file_bug590870.html";
25 is((yield), true, "shouldn't be able to create XUL elements");
27 iframe.src = "file_bug590870.html";
28 is((yield), false, "should be able to create XUL elements");
30 SimpleTest.finish();
33 </script>
34 </pre>
35 </body>
36 </html>