If `sendMessageAndWait` sends a message before the iframe is setup and listening we would wait indefinitely making the test timeout.