Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 function test() {
2 waitForExplicitFinish();
4 var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
6 win.addEventListener("load", function () {
7 win.removeEventListener("load", arguments.callee, false);
9 win.content.addEventListener("focus", function () {
10 win.content.removeEventListener("focus", arguments.callee, false);
12 function onTabClose() {
13 ok(false, "shouldn't have gotten the TabClose event for the last tab");
14 }
15 var tab = win.gBrowser.selectedTab;
16 tab.addEventListener("TabClose", onTabClose, false);
18 EventUtils.synthesizeKey("w", { accelKey: true }, win);
20 ok(win.closed, "accel+w closed the window immediately");
22 tab.removeEventListener("TabClose", onTabClose, false);
24 finish();
25 }, false);
26 }, false);
27 }