fix tests for webpage.sendEvent()