fune/browser/base/content/test/general/browser_bug481560.js
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00

21 lines
553 B
JavaScript

function test() {
waitForExplicitFinish();
whenNewWindowLoaded(null, function(win) {
waitForFocus(function() {
function onTabClose() {
ok(false, "shouldn't have gotten the TabClose event for the last tab");
}
var tab = win.gBrowser.selectedTab;
tab.addEventListener("TabClose", onTabClose);
EventUtils.synthesizeKey("w", { accelKey: true }, win);
ok(win.closed, "accel+w closed the window immediately");
tab.removeEventListener("TabClose", onTabClose);
finish();
}, win);
});
}