Skip to content

Commit

Permalink
Event: Blacklist the onbeforeunload test in Android 2.3
Browse files Browse the repository at this point in the history
Similarly to iOS, Android 2.3 has the onbeforeunload property on window
but doesn't support the event. This commit blacklists the test there as well.
  • Loading branch information
mgol committed Feb 14, 2014
1 parent de75b3c commit 6d2ab64
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/unit/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -1385,10 +1385,11 @@ test("Submit event can be stopped (#11049)", function() {
});

// Test beforeunload event only if it supported (i.e. not Opera)
// Support: iOS 7+
// iOS has the window.onbeforeunload field but doesn't support the beforeunload
// Support: iOS 7+, Android<4.0
// iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
// handler making it impossible to feature-detect the support.
if ( window.onbeforeunload === null && !/(ipad|iphone|ipod)/i.test( navigator.userAgent ) ) {
if ( window.onbeforeunload === null &&
!/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
asyncTest("on(beforeunload)", 1, function() {
var iframe = jQuery(jQuery.parseHTML("<iframe src='data/event/onbeforeunload.html'><iframe>"));

Expand Down

0 comments on commit 6d2ab64

Please sign in to comment.