1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug590870.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +--> 1.8 +<head> 1.9 + <title>Test for creating XUL elements, bug 590870</title> 1.10 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.11 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.12 +</head> 1.13 +<body onload="gen.next()"> 1.14 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=590870">Mozilla Bug 590870</a> 1.15 +<p id="display"></p> 1.16 +<iframe id=iframe></iframe> 1.17 +<pre id="test"> 1.18 +<script class="testbody" type="application/javascript;version=1.8"> 1.19 + 1.20 +SimpleTest.waitForExplicitFinish(); 1.21 +window.addEventListener("message", function(e) { gen.send(e.data) }, false); 1.22 + 1.23 +var gen = runTest(); 1.24 + 1.25 +function runTest() { 1.26 + var iframe = $('iframe'); 1.27 + iframe.src = "http://noxul.example.com/tests/content/base/test/file_bug590870.html"; 1.28 + is((yield), true, "shouldn't be able to create XUL elements"); 1.29 + 1.30 + iframe.src = "file_bug590870.html"; 1.31 + is((yield), false, "should be able to create XUL elements"); 1.32 + 1.33 + SimpleTest.finish(); 1.34 + yield undefined; 1.35 +} 1.36 + 1.37 +</script> 1.38 +</pre> 1.39 +</body> 1.40 +</html>