Improve cross browser compatiblity of tests