diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2014-02-13 16:01:43 -0800 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-02-13 16:01:43 -0800 |
commit | 92361f33516db98ed20d8af7b50192f1b38b94ec (patch) | |
tree | d7f9fc3d11a4d6fe613f119bd907d2282e312ffa | |
parent | a0677d54a6c1557d8b176e58a2bc45b396fe7889 (diff) | |
download | jquery-92361f33516db98ed20d8af7b50192f1b38b94ec.tar.gz jquery-92361f33516db98ed20d8af7b50192f1b38b94ec.zip |
Event: Blacklist the onbeforeunload test in Android 2.3
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.
(cherry-picked from 6d2ab64df7bdda087e79deaa53db969fa6f2cd92)
-rw-r--r-- | test/unit/event.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 781fba5f2..2a9cd22f3 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1400,10 +1400,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)", 4, function() { var win, forIE6 = 0, |