From 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski Date: Mon, 3 Nov 2014 19:53:22 +0100 Subject: Misc: Drop support for older browsers; update support comments That includes IE<8, Opera 12.x, Firefox<29, Safari<6.0 and some hacks for old Blackberry. Fixes gh-1836 Fixes gh-1701 Refs gh-1815 Refs gh-1820 --- test/data/css/cssWidthBeforeDocReady.html | 1 - test/data/dimensions/documentSmall.html | 10 -- test/data/support/shrinkWrapBlocks.html | 23 --- test/data/testsuite.css | 12 +- test/unit/ajax.js | 56 +----- test/unit/attributes.js | 7 +- test/unit/css.js | 39 ++--- test/unit/dimensions.js | 4 +- test/unit/effects.js | 151 ++++++----------- test/unit/event.js | 80 +++------ test/unit/manipulation.js | 3 +- test/unit/offset.js | 53 +++--- test/unit/selector.js | 6 +- test/unit/serialize.js | 6 +- test/unit/support.js | 273 ++---------------------------- test/unit/wrap.js | 3 +- 16 files changed, 152 insertions(+), 575 deletions(-) delete mode 100644 test/data/support/shrinkWrapBlocks.html (limited to 'test') diff --git a/test/data/css/cssWidthBeforeDocReady.html b/test/data/css/cssWidthBeforeDocReady.html index 3bdd1b5ab..c45b6811a 100644 --- a/test/data/css/cssWidthBeforeDocReady.html +++ b/test/data/css/cssWidthBeforeDocReady.html @@ -5,7 +5,6 @@
diff --git a/test/data/support/shrinkWrapBlocks.html b/test/data/support/shrinkWrapBlocks.html deleted file mode 100644 index d781423ec..000000000 --- a/test/data/support/shrinkWrapBlocks.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -
- -
- - - diff --git a/test/data/testsuite.css b/test/data/testsuite.css index d9909ddcc..de5f3fb00 100644 --- a/test/data/testsuite.css +++ b/test/data/testsuite.css @@ -1,7 +1,7 @@ /* for testing opacity set in styles in IE */ ol#empty { opacity: 0; - filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff'); + -ms-filter: "Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff')"; } div#fx-tests h4 { @@ -47,7 +47,7 @@ div.largeheight { } div.largeopacity { - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=100)"; } div.medwidth { @@ -60,7 +60,7 @@ div.medheight { div.medopacity { opacity: 0.5; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)"; } div.nowidth { @@ -73,7 +73,7 @@ div.noheight { div.noopacity { opacity: 0; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)"; } div.hidden { @@ -143,8 +143,8 @@ dfn { display: none; } /* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */ body, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; } -/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */ -#t6652 div { filter: alpha(opacity=50); } +/* #6652 Remove -ms-filter: "alpha(opacity=100)" after animation */ +#t6652 div { -ms-filter: "alpha(opacity=50)"; } /* #10501 */ section { background:#f0f; display:block; } diff --git a/test/unit/ajax.js b/test/unit/ajax.js index c63fd69d9..da1f6ecb9 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1014,9 +1014,7 @@ module( "ajax", { " (no cache)": false }, function( label, cache ) { - var isOpera = !!window.opera; - - asyncTest( "jQuery.ajax() - If-Modified-Since support" + label, 3, function() { + asyncTest( "jQuery.ajax() - If-Modified-Since support" + label, 4, function() { var url = "data/if_modified_since.php?ts=" + ifModifiedNow++; jQuery.ajax({ @@ -1030,33 +1028,15 @@ module( "ajax", { url: url, ifModified: true, cache: cache, - success: function( data, status ) { - if ( data === "FAIL" ) { - ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." ); - ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." ); - } else { - strictEqual( status, "notmodified" ); - ok( data == null, "response body should be empty" ); - } - start(); + success: function( data, status, jqXHR ) { + strictEqual( status, "notmodified", "Following status is 'notmodified'" ); + strictEqual( jqXHR.status, 304, "XHR status is 304" ); + equal( data, null, "no response body is given" ); }, - error: function() { - // Do this because opera simply refuses to implement 304 handling :( - // A feature-driven way of detecting this would be appreciated - // See: http://gist.github.com/599419 - ok( isOpera, "error" ); - ok( isOpera, "error" ); + complete: function() { start(); } }); - }, - error: function() { - strictEqual( false, "error" ); - // Do this because opera simply refuses to implement 304 handling :( - // A feature-driven way of detecting this would be appreciated - // See: http://gist.github.com/599419 - ok( isOpera, "error" ); - start(); } }); }); @@ -1076,31 +1056,13 @@ module( "ajax", { ifModified: true, cache: cache, success: function( data, status ) { - if ( data === "FAIL" ) { - ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." ); - ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." ); - } else { - strictEqual( status, "notmodified" ); - ok( data == null, "response body should be empty" ); - } - start(); + strictEqual( status, "notmodified" ); + ok( data == null, "response body should be empty" ); }, - error: function() { - // Do this because opera simply refuses to implement 304 handling :( - // A feature-driven way of detecting this would be appreciated - // See: http://gist.github.com/599419 - ok( isOpera, "error" ); - ok( isOpera, "error" ); + complete: function() { start(); } }); - }, - error: function() { - // Do this because opera simply refuses to implement 304 handling :( - // A feature-driven way of detecting this would be appreciated - // See: http://gist.github.com/599419 - ok( isOpera, "error" ); - start(); } }); }); diff --git a/test/unit/attributes.js b/test/unit/attributes.js index d76b0e260..55bdfffbd 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -46,10 +46,6 @@ test( "jQuery.propFix integrity test", function() { "contenteditable": "contentEditable" }; - if ( !jQuery.support.enctype ) { - props.enctype = "encoding"; - } - deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" ); }); @@ -594,8 +590,7 @@ test( "removeAttr(String)", function() { $first = jQuery("
"); equal( $first.attr("Case"), "mixed", "case of attribute doesn't matter" ); $first.removeAttr("Case"); - // IE 6/7 return empty string here, not undefined - ok( !$first.attr("Case"), "mixed-case attribute was removed" ); + equal( $first.attr("Case"), undefined, "mixed-case attribute was removed" ); }); test( "removeAttr(String) in XML", function() { diff --git a/test/unit/css.js b/test/unit/css.js index 364249a31..a4ee14cf6 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -231,8 +231,6 @@ test("css(String, Object)", function() { j = jQuery("#nonnodes").contents(); j.css("overflow", "visible"); equal( j.css("overflow"), "visible", "Check node,textnode,comment css works" ); - // opera sometimes doesn't update 'display' correctly, see #2037 - jQuery("#t2037")[0].innerHTML = jQuery("#t2037")[0].innerHTML; equal( jQuery("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" ); div = jQuery("#nothiddendiv"); @@ -297,11 +295,7 @@ if ( !jQuery.support.opacity ) { test2 = test.find( "div" ).css( "opacity", 1 ); function hasFilter( elem ) { - var match = rfilter.exec( elem[0].style.cssText ); - if ( match ) { - return true; - } - return false; + return !!rfilter.exec( elem[0].style.cssText ); } expect( 2 ); ok( !hasFilter( test ), "Removed filter attribute on element without filter in stylesheet" ); @@ -455,7 +449,7 @@ test("show();", function() { expect( 18 ); - var hiddendiv, div, pass, old, test; + var hiddendiv, div, pass, test; hiddendiv = jQuery("div.hidden"); equal(jQuery.css( hiddendiv[0], "display"), "none", "hiddendiv is display: none"); @@ -478,10 +472,7 @@ test("show();", function() { ok( pass, "Show" ); // #show-tests * is set display: none in CSS - jQuery("#qunit-fixture").append("

"); - - old = jQuery("#test-table").show().css("display") !== "table"; - jQuery("#test-table").remove(); + jQuery("#qunit-fixture").append("

"); test = { "div" : "block", @@ -490,14 +481,14 @@ test("show();", function() { "code" : "inline", "pre" : "block", "span" : "inline", - "table" : old ? "block" : "table", - "thead" : old ? "block" : "table-header-group", - "tbody" : old ? "block" : "table-row-group", - "tr" : old ? "block" : "table-row", - "th" : old ? "block" : "table-cell", - "td" : old ? "block" : "table-cell", + "table" : "table", + "thead" : "table-header-group", + "tbody" : "table-row-group", + "tr" : "table-row", + "th" : "table-cell", + "td" : "table-cell", "ul" : "block", - "li" : old ? "block" : "list-item" + "li" : "list-item" }; jQuery.each(test, function(selector, expected) { @@ -848,8 +839,8 @@ test("Do not append px (#9548, #12990)", function() { test("css('width') and css('height') should respect box-sizing, see #11004", function() { expect( 4 ); - // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions). - var el_dis = jQuery("
test
"), + // Support: Android 2.3 (-webkit-box-sizing). + var el_dis = jQuery("
test
"), el = el_dis.clone().appendTo("#qunit-fixture"); equal( el.css("width"), el.css("width", el.css("width")).css("width"), "css('width') is not respecting box-sizing, see #11004"); @@ -930,13 +921,13 @@ test( "css opacity consistency across browsers (#12685)", function() { fixture = jQuery("#qunit-fixture"); // Append style element - jQuery("").appendTo( fixture ); + jQuery("").appendTo( fixture ); el = jQuery("
").appendTo(fixture); - equal( Math.round( el.css("opacity") * 100 ), 10, "opacity from style sheet (filter:alpha with spaces)" ); + equal( Math.round( el.css("opacity") * 100 ), 10, "opacity from style sheet (-ms-filter:alpha with spaces)" ); el.removeClass("opacityWithSpaces_t12685").addClass("opacityNoSpaces_t12685"); - equal( Math.round( el.css("opacity") * 100 ), 20, "opacity from style sheet (filter:alpha without spaces)" ); + equal( Math.round( el.css("opacity") * 100 ), 20, "opacity from style sheet (-ms-filter:alpha without spaces)" ); el.css( "opacity", 0.3 ); equal( Math.round( el.css("opacity") * 100 ), 30, "override opacity" ); el.css( "opacity", "" ); diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 602e97099..c3bf71a63 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -415,8 +415,8 @@ test( "getters on non elements should return null", function() { test("setters with and without box-sizing:border-box", function(){ expect(20); - // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions). - var el_bb = jQuery("
test
").appendTo("#qunit-fixture"), + // Support: Android 2.3 (-webkit-box-sizing). + var el_bb = jQuery("
test
").appendTo("#qunit-fixture"), el = jQuery("
test
").appendTo("#qunit-fixture"), expected = 100; diff --git a/test/unit/effects.js b/test/unit/effects.js index 23a9a50ee..bb5b0ce7d 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -47,7 +47,7 @@ test("show() basic", 2, function() { }); test("show()", 27, function () { - var div, speeds, old, test, + var div, speeds, test, displaysActual, displaysExpected, hiddendiv = jQuery("div.hidden"); @@ -97,10 +97,7 @@ test("show()", 27, function () { QUnit.expectJqData( this, div, "olddisplay" ); // #show-tests * is set display: none in CSS - jQuery("#qunit-fixture").append("

"); - - old = jQuery("#test-table").show().css("display") !== "table"; - jQuery("#test-table").remove(); + jQuery("#qunit-fixture").append("

"); test = { "div" : "block", @@ -109,14 +106,14 @@ test("show()", 27, function () { "code" : "inline", "pre" : "block", "span" : "inline", - "table" : old ? "block" : "table", - "thead" : old ? "block" : "table-header-group", - "tbody" : old ? "block" : "table-row-group", - "tr" : old ? "block" : "table-row", - "th" : old ? "block" : "table-cell", - "td" : old ? "block" : "table-cell", + "table" : "table", + "thead" : "table-header-group", + "tbody" : "table-row-group", + "tr" : "table-row", + "th" : "table-cell", + "td" : "table-cell", "ul" : "block", - "li" : old ? "block" : "list-item" + "li" : "list-item" }; jQuery.each(test, function(selector, expected) { @@ -136,31 +133,27 @@ test("show(Number) - other displays", function() { // #show-tests * is set display: none in CSS - jQuery("#qunit-fixture").append("

"); - - var test, - old = jQuery("#test-table").show().css("display") !== "table"; - jQuery("#test-table").remove(); + jQuery("#qunit-fixture").append("

"); // Note: inline elements are expected to be inline-block // because we're showing width/height // Can't animate width/height inline // See #14344 - test = { + var test = { "div" : "block", "p" : "block", "a" : "inline-block", "code" : "inline-block", "pre" : "block", "span" : "inline-block", - "table" : old ? "block" : "table", - "thead" : old ? "block" : "table-header-group", - "tbody" : old ? "block" : "table-row-group", - "tr" : old ? "block" : "table-row", - "th" : old ? "block" : "table-cell", - "td" : old ? "block" : "table-cell", + "table" : "table", + "thead" : "table-header-group", + "tbody" : "table-row-group", + "tr" : "table-row", + "th" : "table-cell", + "td" : "table-cell", "ul" : "block", - "li" : old ? "block" : "list-item" + "li" : "list-item" }; jQuery.each(test, function(selector, expected) { @@ -289,52 +282,35 @@ test("animate negative padding", function() { test("animate block as inline width/height", function() { expect(3); - var span = jQuery("").css("display", "inline-block").appendTo("body"), - expected = span.css("display"); + var span = jQuery("").css("display", "inline-block").appendTo("body"); span.remove(); - if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) { - - jQuery("#foo").css({ display: "inline", width: "", height: "" }).animate({ width: 42, height: 42 }, 100, function() { - equal( jQuery(this).css("display"), jQuery.support.inlineBlockNeedsLayout ? "inline" : "inline-block", "inline-block was set on non-floated inline element when animating width/height" ); - equal( this.offsetWidth, 42, "width was animated" ); - equal( this.offsetHeight, 42, "height was animated" ); - }); + jQuery("#foo").css({ display: "inline", width: "", height: "" }).animate({ width: 42, height: 42 }, 100, function() { + equal( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" ); + equal( this.offsetWidth, 42, "width was animated" ); + equal( this.offsetHeight, 42, "height was animated" ); + }); - // Browser doesn't support inline-block - } else { - ok( true, "Browser doesn't support inline-block" ); - ok( true, "Browser doesn't support inline-block" ); - ok( true, "Browser doesn't support inline-block" ); - } this.clock.tick( 100 ); }); test("animate native inline width/height", function() { expect(3); - var span = jQuery("").css("display", "inline-block").appendTo("body"), - expected = span.css("display"); + var span = jQuery("").css("display", "inline-block").appendTo("body"); span.remove(); - if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) { - jQuery("#foo").css({ display: "", width: "", height: "" }) - .append("text") - .children("span") - .animate({ width: 42, height: 42 }, 100, function() { - equal( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" ); - equal( this.offsetWidth, 42, "width was animated" ); - equal( this.offsetHeight, 42, "height was animated" ); - }); + jQuery("#foo").css({ display: "", width: "", height: "" }) + .append("text") + .children("span") + .animate({ width: 42, height: 42 }, 100, function() { + equal( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" ); + equal( this.offsetWidth, 42, "width was animated" ); + equal( this.offsetHeight, 42, "height was animated" ); + }); - // Browser doesn't support inline-block - } else { - ok( true, "Browser doesn't support inline-block" ); - ok( true, "Browser doesn't support inline-block" ); - ok( true, "Browser doesn't support inline-block" ); - } this.clock.tick( 100 ); }); @@ -365,30 +341,24 @@ test( "animate block width/height", function() { this.clock.tick( 100 ); }); -test("animate table width/height", function() { +test( "animate table width/height", function() { expect(1); - var displayMode = jQuery("#table").css("display") !== "table" ? "block" : "table"; - - jQuery("#table").animate({ width: 42, height: 42 }, 100, function() { - equal( jQuery(this).css("display"), displayMode, "display mode is correct" ); + jQuery( "#table" ).animate({ width: 42, height: 42 }, 100, function() { + equal( jQuery( this ).css( "display" ), "table", "display mode is correct" ); }); this.clock.tick( 100 ); }); test("animate table-row width/height", function() { expect(3); - var displayMode, - tr = jQuery("#table") + var tr = jQuery("#table") .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 }) .html("
") .find("tr"); - // IE<8 uses "block" instead of the correct display type - displayMode = tr.css("display") !== "table-row" ? "block" : "table-row"; - tr.animate({ width: 10, height: 10 }, 100, function() { - equal( jQuery(this).css("display"), displayMode, "display mode is correct" ); + equal( jQuery( this ).css( "display" ), "table-row", "display mode is correct" ); equal( this.offsetWidth, 20, "width animated to shrink wrap point" ); equal( this.offsetHeight, 20, "height animated to shrink wrap point" ); }); @@ -398,17 +368,13 @@ test("animate table-row width/height", function() { test("animate table-cell width/height", function() { expect(3); - var displayMode, - td = jQuery( "#table" ) + var td = jQuery( "#table" ) .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 }) .html( "
" ) .find( "td" ); - // IE<8 uses "block" instead of the correct display type - displayMode = td.css( "display" ) !== "table-cell" ? "block" : "table-cell"; - td.animate({ width: 10, height: 10 }, 100, function() { - equal( jQuery(this).css("display"), displayMode, "display mode is correct" ); + equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" ); equal( this.offsetWidth, 20, "width animated to shrink wrap point" ); equal( this.offsetHeight, 20, "height animated to shrink wrap point" ); }); @@ -1050,11 +1016,10 @@ jQuery.each({ test("Effects chaining", function() { var remaining = 16, - shrinkwrap = jQuery.support.shrinkWrapBlocks(), props = [ "opacity", "height", "width", "display", "overflow" ], - setup = function( name, selector, hiddenOverflow ) { + setup = function( name, selector ) { var $el = jQuery( selector ); - return $el.data( getProps( $el[0], hiddenOverflow ) ).data( "name", name ); + return $el.data( getProps( $el[0] ) ).data( "name", name ); }, assert = function() { var data = jQuery.data( this ), @@ -1075,21 +1040,19 @@ test("Effects chaining", function() { expect( remaining ); - // We need to pass jQuery.support.shrinkWrapBlocks for all methods that - // set overflow hidden (slide* and show/hide with speed) setup( ".fadeOut().fadeIn()", "#fadein div" ).fadeOut("fast").fadeIn( "fast", assert ); setup( ".fadeIn().fadeOut()", "#fadeout div" ).fadeIn("fast").fadeOut( "fast", assert ); - setup( ".hide().show()", "#show div", shrinkwrap ).hide("fast").show( "fast", assert ); - setup( ".show().hide()", "#hide div", shrinkwrap ).show("fast").hide( "fast", assert ); - setup( ".show().hide(easing)", "#easehide div", shrinkwrap ).show("fast").hide( "fast", "linear", assert ); - setup( ".toggle().toggle() - in", "#togglein div", shrinkwrap ).toggle("fast").toggle( "fast", assert ); - setup( ".toggle().toggle() - out", "#toggleout div", shrinkwrap ).toggle("fast").toggle( "fast", assert ); - setup( ".toggle().toggle(easing) - out", "#easetoggleout div", shrinkwrap ).toggle("fast").toggle( "fast", "linear", assert ); - setup( ".slideDown().slideUp()", "#slidedown div", shrinkwrap ).slideDown("fast").slideUp( "fast", assert ); - setup( ".slideUp().slideDown()", "#slideup div", shrinkwrap ).slideUp("fast").slideDown( "fast", assert ); - setup( ".slideUp().slideDown(easing)", "#easeslideup div", shrinkwrap ).slideUp("fast").slideDown( "fast", "linear", assert ); - setup( ".slideToggle().slideToggle() - in", "#slidetogglein div", shrinkwrap ).slideToggle("fast").slideToggle( "fast", assert ); - setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div", shrinkwrap ).slideToggle("fast").slideToggle( "fast", assert ); + setup( ".hide().show()", "#show div" ).hide("fast").show( "fast", assert ); + setup( ".show().hide()", "#hide div" ).show("fast").hide( "fast", assert ); + setup( ".show().hide(easing)", "#easehide div" ).show("fast").hide( "fast", "linear", assert ); + setup( ".toggle().toggle() - in", "#togglein div" ).toggle("fast").toggle( "fast", assert ); + setup( ".toggle().toggle() - out", "#toggleout div" ).toggle("fast").toggle( "fast", assert ); + setup( ".toggle().toggle(easing) - out", "#easetoggleout div" ).toggle("fast").toggle( "fast", "linear", assert ); + setup( ".slideDown().slideUp()", "#slidedown div" ).slideDown("fast").slideUp( "fast", assert ); + setup( ".slideUp().slideDown()", "#slideup div" ).slideUp("fast").slideDown( "fast", assert ); + setup( ".slideUp().slideDown(easing)", "#easeslideup div" ).slideUp("fast").slideDown( "fast", "linear", assert ); + setup( ".slideToggle().slideToggle() - in", "#slidetogglein div" ).slideToggle("fast").slideToggle( "fast", assert ); + setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div" ).slideToggle("fast").slideToggle( "fast", assert ); setup( ".fadeToggle().fadeToggle() - in", "#fadetogglein div" ).fadeToggle("fast").fadeToggle( "fast", assert ); setup( ".fadeToggle().fadeToggle() - out", "#fadetoggleout div" ).fadeToggle("fast").fadeToggle( "fast", assert ); setup( ".fadeTo(0.5).fadeTo(1.0, easing)", "#fadeto div" ).fadeTo( "fast", 0.5 ).fadeTo( "fast", 1.0, "linear", assert ); @@ -1912,12 +1875,8 @@ test( "Animate properly sets overflow hidden when animating width/height (#12117 equal( div.css( "overflow" ), "hidden", "overflow: hidden set when animating " + prop + " to " + value ); div.stop(); - if ( jQuery.support.shrinkWrapBlocks ) { - ok( true, "cannot restore overflow, shrinkWrapBlocks" ); - } else { - equal( div.css( "overflow" ), "auto", - "overflow: auto restored after animating " + prop + " to " + value ); - } + equal( div.css( "overflow" ), "auto", + "overflow: auto restored after animating " + prop + " to " + value ); }); }); }); diff --git a/test/unit/event.js b/test/unit/event.js index 412fb87bc..61bdc7bca 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -408,15 +408,7 @@ test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() { e.preventDefault(); }); $main.on("click", "#foo", function(e) { - var orig = e.originalEvent; - - if ( typeof(orig.defaultPrevented) === "boolean" || typeof(orig.returnValue) === "boolean" || orig["getPreventDefault"] ) { - equal( e.isDefaultPrevented(), true, "isDefaultPrevented true passed to bubbled event" ); - - } else { - // Opera < 11 doesn't implement any interface we can use, so give it a pass - ok( true, "isDefaultPrevented not supported by this browser, test skipped" ); - } + equal( e.isDefaultPrevented(), true, "isDefaultPrevented true passed to bubbled event" ); }); fakeClick( $anchor2 ); $anchor2.off( "click" ); @@ -1432,7 +1424,7 @@ test("Submit event can be stopped (#11049)", function() { form.remove(); }); -// Test beforeunload event only if it supported (i.e. not Opera) +// Test beforeunload event only if it supported. // 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. @@ -1440,7 +1432,6 @@ if ( window.onbeforeunload === null && !/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) { asyncTest("on(beforeunload)", 4, function() { var win, - forIE6 = 0, fired = false, iframe = jQuery("