1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/xul/test/test_bug386386.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<html> 1.5 +<head><title>Testcase for bug 386386</title> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=386386 1.8 +--> 1.9 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.10 +</head> 1.11 +<body> 1.12 + 1.13 +<iframe id="test386386" src="data:application/vnd.mozilla.xul+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%3F%3E%0A%3Cwindow%3E%3C/window%3E"></iframe> 1.14 + 1.15 +<script class="testbody" type="application/javascript"> 1.16 + 1.17 +function boom() 1.18 +{ 1.19 + var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 1.20 + var doc = document.getElementById("test386386").contentDocument; 1.21 + var observes = doc.createElementNS(XUL_NS, 'observes'); 1.22 + doc.removeChild(doc.documentElement); 1.23 + doc.appendChild(observes); 1.24 + is(0, 0, "Test is successful if we get here without crashing"); 1.25 + SimpleTest.finish(); 1.26 +} 1.27 + 1.28 +function do_test() { 1.29 + setTimeout(boom, 200); 1.30 +} 1.31 +SimpleTest.waitForExplicitFinish(); 1.32 +addLoadEvent(do_test); 1.33 +</script> 1.34 + 1.35 +</body> 1.36 +</html>