CB-6964 ported manual tests

Fixed up style

Fixed typo in addEventListener