mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-11 10:59:24 +08:00
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.