michael@0: /* Any copyright is dedicated to the public domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // Bug 787517: Remove iframe in the handler of showmodalprompt. This shouldn't michael@0: // cause an exception to be thrown. michael@0: michael@0: "use strict"; michael@0: michael@0: SimpleTest.waitForExplicitFinish(); michael@0: browserElementTestHelpers.setEnabledPref(true); michael@0: browserElementTestHelpers.addPermission(); michael@0: michael@0: function runTest() { michael@0: var iframe = document.createElement('iframe'); michael@0: SpecialPowers.wrap(iframe).mozbrowser = true; michael@0: document.body.appendChild(iframe); michael@0: michael@0: iframe.addEventListener("mozbrowsershowmodalprompt", function(e) { michael@0: document.body.removeChild(iframe); michael@0: SimpleTest.executeSoon(function() { michael@0: ok(true); michael@0: SimpleTest.finish(); michael@0: }); michael@0: }); michael@0: michael@0: iframe.src = "data:text/html," + michael@0: ""; michael@0: } michael@0: michael@0: addEventListener('testready', runTest);