mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
27 lines
740 B
JavaScript
27 lines
740 B
JavaScript
/* Any copyright is dedicated to the public domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// Bug 764718 - Test that clicking a link with _target=blank works.
|
|
|
|
"use strict";
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
browserElementTestHelpers.setEnabledPref(true);
|
|
browserElementTestHelpers.addPermission();
|
|
|
|
function runTest() {
|
|
var iframe = document.createElement('iframe');
|
|
SpecialPowers.wrap(iframe).mozbrowser = true;
|
|
|
|
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
|
is(e.detail.url, 'http://example.com/');
|
|
e.preventDefault();
|
|
SimpleTest.finish();
|
|
});
|
|
|
|
iframe.src = "file_browserElement_TargetBlank.html";
|
|
document.body.appendChild(iframe);
|
|
}
|
|
|
|
addEventListener('testready', runTest);
|