test(form): fix broken preventDefault test
test(form): fix broken preventDefault test

the original test relied on incorrect assumptions about how jasmine async
tests work (when setTimeout is triggered) and how browser reloads a page
(the sequence of events) and thus the test passes even when the default
is not prevented.

this change fixes the test by registering an extra submit event handler
that checks if the default was prevented.

if the default was not prevented, the test will fail and the page will
be reloaded causing the test runner to panic.

ammula88/angular.js,ammula88/angular.js,ammula88/angular.js,ammula88/angular.js,ammula88/angular.js