2009-04-05 01:10:24 -07:00
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
|
|
|
|
|
|
|
|
win.addEventListener("load", function () {
|
|
|
|
win.removeEventListener("load", arguments.callee, false);
|
|
|
|
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 11:00:39 -07:00
|
|
|
win.content.addEventListener("focus", function () {
|
|
|
|
win.content.removeEventListener("focus", arguments.callee, false);
|
|
|
|
|
2011-06-07 07:45:26 -07:00
|
|
|
function onTabClose() {
|
2009-11-06 13:44:11 -08:00
|
|
|
ok(false, "shouldn't have gotten the TabClose event for the last tab");
|
2011-06-07 07:45:26 -07:00
|
|
|
}
|
|
|
|
var tab = win.gBrowser.selectedTab;
|
|
|
|
tab.addEventListener("TabClose", onTabClose, false);
|
2009-11-06 13:44:11 -08:00
|
|
|
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 11:00:39 -07:00
|
|
|
EventUtils.synthesizeKey("w", { accelKey: true }, win);
|
2009-11-06 13:44:11 -08:00
|
|
|
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 11:00:39 -07:00
|
|
|
ok(win.closed, "accel+w closed the window immediately");
|
|
|
|
|
2011-06-07 07:45:26 -07:00
|
|
|
tab.removeEventListener("TabClose", onTabClose, false);
|
|
|
|
|
2009-11-06 13:44:11 -08:00
|
|
|
finish();
|
2009-04-05 01:10:24 -07:00
|
|
|
}, false);
|
|
|
|
}, false);
|
|
|
|
}
|