browser_bug481560.js
Go to the documentation of this file.
1 function test() {
3 
4  var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
5 
6  win.addEventListener("load", function () {
7  win.removeEventListener("load", arguments.callee, false);
8 
9  win.content.addEventListener("focus", function () {
10  win.content.removeEventListener("focus", arguments.callee, false);
11 
12  win.gBrowser.selectedTab.addEventListener("TabClose", function () {
13  ok(false, "shouldn't have gotten the TabClose event for the last tab");
14  }, false);
15 
16  EventUtils.synthesizeKey("w", { accelKey: true }, win);
17 
18  ok(win.closed, "accel+w closed the window immediately");
19 
20  finish();
21  }, false);
22  }, false);
23 }
waitForExplicitFinish()
function getBrowserURL()
return!aWindow arguments!aWindow arguments[0]
function test()