Fix argument to an event handler in a test

Also, eliminate code to deal with IE7
Fix test on IE by not depending on newline behavior