Restore window.postMessage between tests