Refactor resize event testing