current tests test the keyboard shortcut, by sending an event; e=document.createEvent(... e.initEvent(... e.keyCode = ... document.body.dispatchEvent(e) window.close directly after logging to the console make tests for chromium and firefox engines https://developer.mozilla.org/en/Automated_testing_tips_and_tricks https://developer.mozilla.org/en/Mozmill_Tests/Addon_tests