From 55c196e8377221f1b417eda5cda74a56c5cae96a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Tue, 18 Mar 2014 20:59:33 +0100 Subject: [PATCH] Event: Simplify the logic behind blacklisting Android 2.3 on one test --- test/unit/event.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/unit/event.js b/test/unit/event.js index 6e5a2d09e..67fe9115b 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -387,12 +387,7 @@ test("on immediate propagation", function() { }); test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() { - // Support: Android 2.3 - if ( /android 2\.3/i.test( navigator.userAgent ) ) { - expect( 2 ); - } else { - expect( 3 ); - } + expect( 3 ); var $anchor2 = jQuery( "#anchor2" ), $main = jQuery( "#qunit-fixture" ), @@ -427,7 +422,9 @@ test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() { // Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks to stopPropagation // in such a case. // Support: Android 2.3 - if ( !/android 2\.3/i.test( navigator.userAgent ) ) { + if ( /android 2\.3/i.test( navigator.userAgent ) ) { + ok( true, "Android 2.3, skipping native stopImmediatePropagation check" ); + } else { $anchor2.on( "click", function( e ) { e.stopImmediatePropagation(); ok( true, "anchor was clicked and prop stopped" ); -- 2.39.5