Add tests for postMessage