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.
michael@0 | 1 | function test() { |
michael@0 | 2 | waitForExplicitFinish(); |
michael@0 | 3 | |
michael@0 | 4 | var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no"); |
michael@0 | 5 | |
michael@0 | 6 | win.addEventListener("load", function () { |
michael@0 | 7 | win.removeEventListener("load", arguments.callee, false); |
michael@0 | 8 | |
michael@0 | 9 | win.content.addEventListener("focus", function () { |
michael@0 | 10 | win.content.removeEventListener("focus", arguments.callee, false); |
michael@0 | 11 | |
michael@0 | 12 | function onTabClose() { |
michael@0 | 13 | ok(false, "shouldn't have gotten the TabClose event for the last tab"); |
michael@0 | 14 | } |
michael@0 | 15 | var tab = win.gBrowser.selectedTab; |
michael@0 | 16 | tab.addEventListener("TabClose", onTabClose, false); |
michael@0 | 17 | |
michael@0 | 18 | EventUtils.synthesizeKey("w", { accelKey: true }, win); |
michael@0 | 19 | |
michael@0 | 20 | ok(win.closed, "accel+w closed the window immediately"); |
michael@0 | 21 | |
michael@0 | 22 | tab.removeEventListener("TabClose", onTabClose, false); |
michael@0 | 23 | |
michael@0 | 24 | finish(); |
michael@0 | 25 | }, false); |
michael@0 | 26 | }, false); |
michael@0 | 27 | } |