gecko/browser/base/content/test/browser_bug481560.js
Dão Gottwald 795121a212 fix completely broken browser_bug481560.js
--HG--
extra : rebase_source : 0c0b93b67504c9230c4fb3cced6de6a35e43a1c5
2009-11-06 22:44:11 +01:00

24 lines
705 B
JavaScript

function test() {
waitForExplicitFinish();
var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
win.addEventListener("load", function () {
win.removeEventListener("load", arguments.callee, false);
win.content.addEventListener("focus", function () {
win.content.removeEventListener("focus", arguments.callee, false);
win.gBrowser.selectedTab.addEventListener("TabClose", function () {
ok(false, "shouldn't have gotten the TabClose event for the last tab");
}, false);
EventUtils.synthesizeKey("w", { accelKey: true }, win);
ok(win.closed, "accel+w closed the window immediately");
finish();
}, false);
}, false);
}