use: `sinon.assert.calledOnce(window.close)`
(and ditto for the other calls)