aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-02-13 16:00:30 -0800
committerMichał Gołębiowski <m.goleb@gmail.com>2014-02-13 16:00:30 -0800
commit6d2ab64df7bdda087e79deaa53db969fa6f2cd92 (patch)
treeca1bcad539d530ab1e037492ffebda4b49c42542
parentde75b3cc626829c3478a8a6d59dddc948d348b41 (diff)
downloadjquery-6d2ab64df7bdda087e79deaa53db969fa6f2cd92.tar.gz
jquery-6d2ab64df7bdda087e79deaa53db969fa6f2cd92.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.
-rw-r--r--test/unit/event.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index a04135f26..22f6dacef 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -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>"));