Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0fc8359

Browse files
committed
fixup! test(*): fix tests involving submit on Chrome 60
1 parent ed581ec commit 0fc8359

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/ng/directive/formSpec.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,18 @@ describe('form', function() {
466466
.runs(function() {
467467
expect(doc.html()).toBe('');
468468
expect(destroyed).toBe(true);
469-
expect(reloadPrevented).toBe('never called');
470469
expect(submitted).toBe(false); // this is known corner-case that is not currently handled
471470
// the issue is that the submit listener is destroyed before
472471
// the event propagates there. we can fix this if we see
473472
// the issue in the wild, I'm not going to bother to do it
474473
// now. (i)
475474

475+
// Support: Chrome 60+ (on Windows)
476+
// Chrome 60+ on Windows does not fire `submit` events when the form is not attached to
477+
// the DOM. Verify that the `submit` listener was either never fired or (if fired) the
478+
// reload was prevented.
479+
expect(reloadPrevented).not.toBe(false);
480+
476481
// prevent mem leak in test
477482
form[0].removeEventListener('submit', assertPreventDefaultListener);
478483
})

0 commit comments

Comments
 (0)