michael@0: /* Any copyright is dedicated to the public domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // Bug 764718 - Test that clicking a link with _target=blank works. 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: michael@0: iframe.addEventListener('mozbrowseropenwindow', function(e) { michael@0: is(e.detail.url, 'http://example.com/'); michael@0: e.preventDefault(); michael@0: SimpleTest.finish(); michael@0: }); michael@0: michael@0: iframe.src = "file_browserElement_TargetBlank.html"; michael@0: document.body.appendChild(iframe); michael@0: } michael@0: michael@0: addEventListener('testready', runTest);